rendered paste body/* ID: tiago1LANG: JAVATASK: ride*/import java.io.*;public class Ride{ public static void main(String[] args) { String abc = "ABCDEFGHIJKLMNOPQRSTUVXYWZ"; String cometa = null; String group = null; int produto1 = 1; int produto2 = 1; BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in )); try{ cometa = dataIn.readLine(); for(int i = 0; i < cometa.length(); i++) { produto1 *= abc.indexOf(cometa.charAt(i)) + 1; } } catch(IOException e) { } try{ group = dataIn.readLine(); for(int i = 0; i < group.length(); i++) { produto2 *= abc.indexOf(group.charAt(i)) + 1; } } catch(IOException e) { } if(produto1 % 47 == produto2 % 47 ) System.out.println("GO"); else System.out.println("STAY"); }}