scanner and gcd