https://www.acmicpc.net/problem/4153
#include <iostream>
using namespace std;
int main() {
for(;;){
int a,b,c;
cin>>a>>b>>c;
if(a==0&&b==0&&c==0) break;
int sum=a*a+b*b+c*c;
int ma=max(a,max(b,c));
if(sum-ma*ma==ma*ma) cout<<"right"<<'\n';
else cout<<"wrong"<<'\n';
}
}