#include #include using namespace std; using ll = long long; constexpr int iINF = 1'000'000'000; constexpr ll llINF = 1'000'000'000'000'000'000; using rat = pair; bool cmp (rat x, rat y) { return x.first * y.second < x.second * y.first; } int main () { int A, B; cin >> A >> B; int H, W; cin >> H >> W; rat non_rotate = make_pair(H * H * B, A); if (cmp(make_pair(W * W * A, B), non_rotate)) non_rotate = make_pair(W * W * A, B); swap(A, B); rat rotate = make_pair(H * H * B, A); if (cmp(make_pair(W * W * A, B), rotate)) rotate = make_pair(W * W * A, B); if (!cmp(non_rotate, rotate) && !cmp(rotate, non_rotate)) { cout << "Same\n"; } else if (cmp(non_rotate, rotate)) { cout << "Rotating\n"; } else { cout << "Non-rotating\n"; } }