10 static boolean debug
= false;
11 static String name
= "ride";
13 static BufferedReader f
;
14 static PrintWriter out
;
16 static int chsum(String s
){
17 String ch
= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
21 for(int i
= 0; i
< s
.length(); i
++){
22 sum
*= ch
.indexOf(s
.charAt(i
) + 1);
28 public static void main (String
[] args
) throws IOException
{
30 f
= new BufferedReader(new InputStreamReader(System
.in
));
31 out
= new PrintWriter(new BufferedWriter(new OutputStreamWriter(System
.out
)));
33 f
= new BufferedReader(new FileReader(name
+ ".in"));
34 out
= new PrintWriter(new BufferedWriter(new FileWriter(name
+ ".out")));
37 // StringTokenizer st = new StringTokenizer(f.readLine());
51 out
.println( (chsum(s1
) == chsum(s2
)) ?
"GO" : "STAY" );
53 out
.close(); // close the output file
54 System
.exit(0); // don't omit this!