#include<bits/stdc++.h>
using namespace std;
typedef long long ll ;
int dp[35][25][17][16];
ll p2[36], p3[36], p5[36], p7[36], n;
int state(int a, int b, int c, int d) {
if(dp[a][b][c][d] != -1) return dp[a][b][c][d];
ll num = p2[a] * p3[b] * p5[c] * p7[d];
if(num >= n) return 0;
if(!state(a + 1, b, c, d)) return dp[a][b][c][d] = 1;
if(!state(a, b + 1, c, d)) return dp[a][b][c][d] = 1;
if(!state(a, b, c + 1, d)) return dp[a][b][c][d] = 1;
if(!state(a, b, c, d + 1)) return dp[a][b][c][d] = 1;
if(!state(a + 2, b, c, d)) return dp[a][b][c][d] = 1;
if(!state(a + 1, b + 1, c, d)) return dp[a][b][c][d] = 1;
if(!state(a + 3, b, c, d)) return dp[a][b][c][d] = 1;
if(!state(a, b + 2, c, d)) return dp[a][b][c][d] = 1;
return dp[a][b][c][d] = 0;
}
int main() {
int i;
p2[0] = p3[0] = p5[0] = p7[0] = 1;
for(i = 1; i <= 34; i++) {
p2[i] = 2 * p2[i - 1];
p3[i] = 3 * p3[i - 1];
p5[i] = 5 * p5[i - 1];
p7[i] = 7 * p7[i - 1];
}
while( scanf("%lld", &n) != EOF) {
memset(dp, -1, sizeof(dp));
if(state(0, 0, 0, 0)) cout << "Stan wins.\n";
else cout << "Ollie wins.\n";
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdHlwZWRlZiBsb25nIGxvbmcgbGwgOwoKaW50IGRwWzM1XVsyNV1bMTddWzE2XTsKbGwgcDJbMzZdLCBwM1szNl0sIHA1WzM2XSwgcDdbMzZdLCBuOwoKaW50IHN0YXRlKGludCBhLCBpbnQgYiwgaW50IGMsIGludCBkKSB7CglpZihkcFthXVtiXVtjXVtkXSAhPSAtMSkgcmV0dXJuIGRwW2FdW2JdW2NdW2RdOwoJbGwgbnVtID0gcDJbYV0gKiBwM1tiXSAqIHA1W2NdICogcDdbZF07CglpZihudW0gPj0gbikgc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