#include <bits/stdc++.h>
using namespace std;
int a[10];
map<int, int>haxi;
int main() {
//int a,b,c,d,e;cin>>a>>b>>c>d>>e;
for (int i = 0; i < 5; i++) {
cin >> a[i];
haxi[a[i]]++;
}
int cnt = 0;
for (auto &it : haxi) {
//cout << it.first << " " << it.second << endl;
if (it.second >= 4) {
puts("Square");
return 0;
} else if (it.second >= 2 && it.second <= 4) {
cnt++;
}
}
if (cnt >= 2) {
puts("Rectangle");
} else
puts("No");
}