#include <iostream>
#include <algorithm>
using namespace std;
int main() {
while(true) {
int n,m,p;
cin >> n >> m >> p;
if (n == 0) {
break;
}
if (max(n,max(m,p)) * max(n,max(m,p)) == min(n,min(m,p))*min(n,min(m,p)) + (max(n,max(m,p)) - min(n,min(m,p)*max(n,max(m,p)) - min(n,min(m,p))) {
cout << "right";
}
else{
cout << "wrong";
}
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: