/* * GCF * written by Arthur Gapusan (ajgapusan@hotmail.com) * http://www.planet-java.biz.ly * */ class gcfm { public static void main(String args[]) { int x = Integer.parseInt(args[0]); int y = Integer.parseInt(args[1]); for (int r=y;y>0;y--) { if ((x%y)==0) if ((r%y)==0) break; } System.out.println(y); } }