Let $a$, $b$, $c$, and $d$ be positive integers satisfy the following properties: (a) there are exactly $2004$ pairs of real numbers $(x,y)$ with $0 \le x, y \le 1$ such that both $ax+by$ and $cx+dy$ are integers. (b) $gcd(a,c)=6$. Find $gcd(b,d)$.
Source: MOP 2005 Homework - Black Group #23
Tags: number theory unsolved, number theory
Let $a$, $b$, $c$, and $d$ be positive integers satisfy the following properties: (a) there are exactly $2004$ pairs of real numbers $(x,y)$ with $0 \le x, y \le 1$ such that both $ax+by$ and $cx+dy$ are integers. (b) $gcd(a,c)=6$. Find $gcd(b,d)$.