// (c) by Taatudi

public class gcd {
  public static void main(String[] args) {
    if (args.length != 2) {
      System.out.println("usage: gcd <int> <int>");
      System.exit(1);
    }
    int a, b;
    int t2 = Integer.parseInt(args[0]);
    int t1 = Integer.parseInt(args[1]);
   if(t1 > t2) {
      a = t1;
      b = t2;
   }
   else {
      b = t1;
      a = t2;
   }

    int m = a % b;

    while (m != 0) {
      a = b;
      b = m;
      m = a % b;
    }

    System.out.println("gcd: "+ b);
  }
}