import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
if(A == 0 && B == 0 && C == 0) break;
if((A * A + B * B) == C * C) {
System.out.println("right");
} else if(A * A == (B * B + C * C)) {
System.out.println("right");
} else if(B * B == (C * C + A * A)) {
System.out.println("right");
} else {
System.out.println("wrong");
}
}
}
}