#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);
		}
	}
}