Let $a,b,c,d$ be positive integers such that the number of pairs $(x,y) \in (0,1)^2$ such that both $ax+by$ and $cx+dy$ are integers is equal with 2004. If $\gcd (a,c)=6$ find $\gcd (b,d)$.
Problem
Source: Bulgarian Math Olympiad MO 2004, problem 5
Tags: geometry, rhombus, number theory unsolved, number theory