//Time 78ms, Memory 280K
#include<iostream> using namespace std; int main() { int i,a,b,k; while(cin>>a>>b && (a || b)) { k=0; if(a<b) { i=a;a=b;b=i; } while(b) { if(a%b==0) { k++;break; } if(a/b>1) { k++;break; } i=b;b=a%b;a=i;k++; } if(k%2) cout<<"Stan wins"<<endl; else cout<<"Ollie wins"<<endl; } return 0; }