using System; class c1704 { static int gcd(int x,int y) { int temp; if ( x