样例能过
#include<bits/stdc++.h>
using namespace std;
int a,b;
void solve()
{
bool f=true;
while(1)
{
if(a>b) swap(a,b);
if(b%a==0) break;
if(b>2*a) break;
b-=a,f=!f;
}
if(f) cout<<"Stan wins"<<endl;
else cout<<"Ollie wins"<<endl;
}
int main()
{
while(1)
{
cin>>a>>b;
if(!a&&!b) break;
solve();
}
return 0;
}