#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define PI 3.14159265
#define OO 1e9
#define SS second
#define FF first
#define Trace(n) cout<< #n <<" = "<< n << endl;
#define ll long long
#define endl "\n"
int dx[] = { 0, 0, -1, 1, 1, 1, -1, -1 };
int dy[] = { -1, 1, 0, 0, 1, -1, 1, -1 };
void TimeElapsed()
{
#ifndef ONLINE_JUDGE
cout << endl;
cout << "Time Elapsed :" << 1.0*clock() / CLOCKS_PER_SEC << " s." <<
endl;
#endif
}
void fast()
{
std::ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
void setWinner(string &w)
{
if (w == "Stan wins")
w = "Ollie wins";
else
w = "Stan wins";
}
int main()
{
fast();
int n, m;
while (cin >> n >> m)
{
if (n == 0 && m == 0)
break;
if (n < m)
swap(n, m);
string ans = "Stan wins"; // or "Ollie wins"
while (true)
{
if (n % m == 0 || n / m > 1)
{
cout << ans << endl;
break;
}
n %= m;
swap(n, m);
setWinner(ans);
}
}
}
I2RlZmluZSBfQ1JUX1NFQ1VSRV9OT19XQVJOSU5HUwoKI2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgojZGVmaW5lIFBJCQkJMy4xNDE1OTI2NQojZGVmaW5lIE9PCQkJMWU5CiNkZWZpbmUgU1MgICAgICAgCXNlY29uZAojZGVmaW5lIEZGICAgICAgIAlmaXJzdAojZGVmaW5lIFRyYWNlKG4pICAJY291dDw8ICNuIDw8IiA9ICI8PCBuIDw8IGVuZGw7IAojZGVmaW5lIGxsCQkJbG9uZyBsb25nCiNkZWZpbmUgZW5kbAkJIlxuIgoKaW50IGR4W10gPSB7IDAsIDAsIC0xLCAxLCAxLCAxLCAtMSwgLTEgfTsKaW50IGR5W10gPSB7IC0xLCAxLCAwLCAwLCAxLCAtMSwgMSwgLT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