#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll; // <dis2 to circle 1, dis2 to circle 2>

const int max_n = 2000;
int N, X1, Y1, X2, Y2;
pll points[max_n];

ll d2(ll a, ll b, ll c, ll d) {
    return (a - c) * (a - c) + (b - d) * (b - d);
}

int main() {
    scanf("%d %d %d %d %d", &N, &X1, &Y1, &X2, &Y2);
    for (int i = 0; i < N; i++) {
        int x, y;
        scanf("%d %d", &x, &y);
        points[i] = pll(d2(x, y, X1, Y1), d2(x, y, X2, Y2));
    }

    sort(points, points + N);

    // for (int i = 0; i < N; i++)
    //     printf("%lld, %lld\n", points[i].first, points[i].second);

    ll ans = 1e15;
    for (int i = 0; i < N; i++) {
        ll r1sq = points[i].first; // points[0, i] covered
        ll r2sq = 0;
        for (int j = i + 1; j < N; j++) {
            if (points[i].second > r2sq)
                r2sq = points[j].second;
        }

        // printf("%d: %lld, %lld\n", i, r1sq, r2sq);

        ans = min(ans, r1sq + r2sq);
    }

    printf("%lld\n", ans);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll; // <dis2 to circle 1, dis2 to circle 2>

const int max_n = 2000;
int N, X1, Y1, X2, Y2;
pll points[max_n + 1];

ll d2(ll a, ll b, ll c, ll d) {
    return (a - c) * (a - c) + (b - d) * (b - d);
}

int main() {
    scanf("%d %d %d %d %d", &N, &X1, &Y1, &X2, &Y2);
    for (int i = 0; i < N; i++) {
        int x, y;
        scanf("%d %d", &x, &y);
        points[i] = pll(d2(x, y, X1, Y1), d2(x, y, X2, Y2));
    }

    points[N] = pll(0, d2(X1, Y1, X2, Y2));

    sort(points, points + N + 1);

    // for (int i = 0; i < N; i++)
    //     printf("%lld, %lld\n", points[i].first, points[i].second);

    ll ans = 1e18;
    for (int i = 0; i <= N; i++) {
        ll r1sq = points[i].first; // points[0, i] covered
        // ll r2sq = max_element(points + i + 1, points + N + 1,
        //             [&](const pll& a, const pll& b) {
        //                 return a.second < b.second;
        //             })->second;
        ll r2sq = 0;
        for (int j = i + 1; j <= N; j++)
            r2sq = max(r2sq, points[j].second);

        // printf("%d: %lld, %lld\n", i, r1sq, r2sq);

        ans = min(ans, r1sq + r2sq);
    }

    printf("%lld\n", ans);

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long int x[3], y[3], r1 = 0, r2 = 0, ma, mb, n, e;
pair<long long int, long long int>p[4004];
int main()
{
	cin >> n >> x[0] >> y[0] >> x[1] >> y[1];
	e = n;
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i < e; i++)
	{
		ma = (max(p[i].first, x[0]) - min(p[i].first, x[0]))*(max(p[i].first, x[0]) - min(p[i].first, x[0]));
		ma += (max(p[i].second, y[0]) - min(p[i].second, y[0]))*(max(p[i].second, y[0]) - min(p[i].second, y[0]));
		mb = (max(p[i].first, x[1]) - min(p[i].first, x[1]))*(max(p[i].first, x[1]) - min(p[i].first, x[1]));
		mb += (max(p[i].second, y[1]) - min(p[i].second, y[1]))*(max(p[i].second, y[1]) - min(p[i].second, y[1]));
		if (ma <= r1 || mb <= r2)
			continue;
		if (ma+r2<mb+r1)
			r1 = ma;
		else if (ma + r2>mb + r1)
			r2 = mb;
		else if (ma>mb)
			r2 = mb;
		else if (mb > ma)
			r1 = ma;
		else if (ma==mb)
		{
			p[e] = p[i];
			e++;
		}
	}
	cout << r1 + r2 << endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll  r1, r2, rm1, rm2, n;
pair<ll, ll>p[2002], rf, rs;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin >> n;
	cin >> rf.first >> rf.second >> rs.first >> rs.second;
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i <= n; i++)
	{
		if (i != n)
			rm1 = (rf.first - p[i].first)*(rf.first - p[i].first) + (rf.second - p[i].second)*(rf.second - p[i].second);
		else
			rm1 = 0;
		rm2 = 0;
		for (int j = 0; j < n; j++)
		{
			if (i == j)
				continue;
			if (rm1>(rf.first - p[j].first)*(rf.first - p[j].first) + (rf.second - p[j].second)*(rf.second - p[j].second))
				continue;
			rm2 = max(rm2,(rs.first - p[j].first)*(rs.first - p[j].first) + (rs.second - p[j].second)*(rs.second - p[j].second));
		}
		if (i == 0 || rm1 + rm2<r1 + r2)
		{
			r1 = rm1;
			r2 = rm2;
		}
	}
	cout << r1 + r2 << "\n";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long int x[3], y[3], r1 = 0, r2 = 0, ma,mb, n;
pair<long long int, long long int>p[2002];
int main()
{
	cin >> n >> x[0] >> y[0] >> x[1] >> y[1];
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i < n; i++)
	{
		ma = (max(p[i].first, x[0]) - min(p[i].first, x[0]))*(max(p[i].first, x[0]) - min(p[i].first, x[0]));
		ma += (max(p[i].second, y[0]) - min(p[i].second, y[0]))*(max(p[i].second, y[0]) - min(p[i].second, y[0]));
		mb = (max(p[i].first, x[1]) - min(p[i].first, x[1]))*(max(p[i].first, x[1]) - min(p[i].first, x[1]));
		mb += (max(p[i].second, y[1]) - min(p[i].second, y[1]))*(max(p[i].second, y[1]) - min(p[i].second, y[1]));
		if (ma <= r1 || mb <= r2)
			continue;
		if (ma>mb)
			r2 = mb;
		else
			r1 = ma;
	}
	cout << r1 + r2 << endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll  r1, r2, rm1, rm2, n;
pair<ll, ll>p[2002], rf, rs;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin >> n;
	cin >> rf.first >> rf.second >> rs.first >> rs.second;
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i < n; i++)
	{
		rm1 = (rf.first - p[i].first)*(rf.first - p[i].first) + (rf.second - p[i].second)*(rf.second - p[i].second);
		rm2 = 0;
		for (int j = 0; j < n; j++)
		{
			if (i == j)
				continue;
			if (rm1>(rf.first - p[j].first)*(rf.first - p[j].first) + (rf.second - p[j].second)*(rf.second - p[j].second)
				|| rm2>(rs.first - p[j].first)*(rs.first - p[j].first) + (rs.second - p[j].second)*(rs.second - p[j].second))
				continue;
			ll w = (rf.first - p[j].first)*(rf.first - p[j].first) + (rf.second - p[j].second)*(rf.second - p[j].second);
			ll q = (rs.first - p[j].first)*(rs.first - p[j].first) + (rs.second - p[j].second)*(rs.second - p[j].second);
			if (w + rm2 < q + rm1)
				rm1 = w;
			else
				rm2 = q;
		}
		if (i == 0 || rm1 + rm2<r1 + r2)
		{
			r1 = rm1;
			r2 = rm2;
		}
	}
	cout << r1 + r2 << "\n";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long int x[3], y[3], r1 = 0, r2 = 0, ma, mb, n, e;
pair<long long int, long long int>p[4004];
int main()
{
	cin >> n >> x[0] >> y[0] >> x[1] >> y[1];
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	e = n;
	for (int i = 0; i < e; i++)
	{
		ma = (max(p[i].first, x[0]) - min(p[i].first, x[0]))*(max(p[i].first, x[0]) - min(p[i].first, x[0]));
		ma += (max(p[i].second, y[0]) - min(p[i].second, y[0]))*(max(p[i].second, y[0]) - min(p[i].second, y[0]));
		mb = (max(p[i].first, x[1]) - min(p[i].first, x[1]))*(max(p[i].first, x[1]) - min(p[i].first, x[1]));
		mb += (max(p[i].second, y[1]) - min(p[i].second, y[1]))*(max(p[i].second, y[1]) - min(p[i].second, y[1]));
		if (ma <= r1 || mb <= r2)
			continue;
		if (ma + r2 == mb + r1&&i<n)
		{
			p[e] = p[i];
			e++;
			continue;
		}
		else if (ma+r2<mb+r1)
			r1 = ma;
		else
			r2 = mb;
	}
	cout << r1 + r2 << endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long int x[3], y[3], r1 = 0, r2 = 0, ma,mb, n;
pair<long long int, long long int>p[2002];
int main()
{
	cin >> n >> x[0] >> y[0] >> x[1] >> y[1];
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i < n; i++)
	{
		ma = (max(p[i].first, x[0]) - min(p[i].first, x[0]))*(max(p[i].first, x[0]) - min(p[i].first, x[0]));
		ma += (max(p[i].second, y[0]) - min(p[i].second, y[0]))*(max(p[i].second, y[0]) - min(p[i].second, y[0]));
		mb = (max(p[i].first, x[1]) - min(p[i].first, x[1]))*(max(p[i].first, x[1]) - min(p[i].first, x[1]));
		mb += (max(p[i].second, y[1]) - min(p[i].second, y[1]))*(max(p[i].second, y[1]) - min(p[i].second, y[1]));
		if (ma <= r1 || mb <= r2)
			continue;
		if (ma+r2<mb+r1)
			r1 = ma;
		else if (ma + r2>mb + r1)
			r2 = mb;
		else if (ma>mb)
			r2 = mb;
		else if (mb > ma)
			r1 = ma;
	}
	cout << r1 + r2 << endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long int x[3], y[3], r1 = 0, r2 = 0, ma,mb, n;
pair<long long int, long long int>p[2002];
int main()
{
	cin >> n >> x[0] >> y[0] >> x[1] >> y[1];
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i < n; i++)
	{
		ma = (max(p[i].first, x[0]) - min(p[i].first, x[0]))*(max(p[i].first, x[0]) - min(p[i].first, x[0]));
		ma += (max(p[i].second, y[0]) - min(p[i].second, y[0]))*(max(p[i].second, y[0]) - min(p[i].second, y[0]));
		mb = (max(p[i].first, x[1]) - min(p[i].first, x[1]))*(max(p[i].first, x[1]) - min(p[i].first, x[1]));
		mb += (max(p[i].second, y[1]) - min(p[i].second, y[1]))*(max(p[i].second, y[1]) - min(p[i].second, y[1]));
		if (ma <= r1 || mb <= r2)
			continue;
		if (ma>mb)
			r2 = mb;
		else if (mb > ma)
			r1 = ma;
		else if (r1 > r2)
			r1 = ma;
		else
			r2 = mb;
	}
	cout << r1 + r2 << endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll  r1, r2, rm1, rm2, n;
pair<ll, ll>p[2002], rf, rs;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin >> n;
	cin >> rf.first >> rf.second >> rs.first >> rs.second;
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i <= n; i++)
	{
		if (i != n)
			rm1 = (rf.first - p[i].first)*(rf.first - p[i].first) + (rf.second - p[i].second)*(rf.second - p[i].second);
		else
			rm1 = 0;
		rm2 = 0;
		for (int j = 0; j < n; j++)
		{
			if (i == j)
				continue;
			if (rm1>(rf.first - p[j].first)*(rf.first - p[j].first) + (rf.second - p[j].second)*(rf.second - p[j].second))
				continue;
			rm2 = (rs.first - p[j].first)*(rs.first - p[j].first) + (rs.second - p[j].second)*(rs.second - p[j].second);
		}
		if (i == 0 || rm1 + rm2<r1 + r2)
		{
			r1 = rm1;
			r2 = rm2;
		}
	}
	cout << r1 + r2 << "\n";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long int x[3], y[3], r1 = 0, r2 = 0, ma,mb, n;
pair<long long int, long long int>p[2002];
int main()
{
	cin >> n >> x[0] >> y[0] >> x[1] >> y[1];
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i < n; i++)
	{
		ma = (max(p[i].first, x[0]) - min(p[i].first, x[0]))*(max(p[i].first, x[0]) - min(p[i].first, x[0]));
		ma += (max(p[i].second, y[0]) - min(p[i].second, y[0]))*(max(p[i].second, y[0]) - min(p[i].second, y[0]));
		mb = (max(p[i].first, x[1]) - min(p[i].first, x[1]))*(max(p[i].first, x[1]) - min(p[i].first, x[1]));
		mb += (max(p[i].second, y[1]) - min(p[i].second, y[1]))*(max(p[i].second, y[1]) - min(p[i].second, y[1]));
		if (ma <= r1 || mb <= r2)
			continue;
		if (ma>mb)
			r2 = mb;
		else if (mb > ma)
			r1 = ma;
		else if (ma+r2<mb+r1)
			r1 = ma;
		else
			r2 = mb;
	}
	cout << r1 + r2 << endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long int x[3], y[3], r1 = 0, r2 = 0, ma,mb, n;
pair<long long int, long long int>p[2002];
int main()
{
	cin >> n >> x[0] >> y[0] >> x[1] >> y[1];
	for (int i = 0; i < n; i++)
		cin >> p[i].first >> p[i].second;
	for (int i = 0; i < n; i++)
	{
		ma = (max(p[i].first, x[0]) - min(p[i].first, x[0]))*(max(p[i].first, x[0]) - min(p[i].first, x[0]));
		ma += (max(p[i].second, y[0]) - min(p[i].second, y[0]))*(max(p[i].second, y[0]) - min(p[i].second, y[0]));
		mb = (max(p[i].first, x[1]) - min(p[i].first, x[1]))*(max(p[i].first, x[1]) - min(p[i].first, x[1]));
		mb += (max(p[i].second, y[1]) - min(p[i].second, y[1]))*(max(p[i].second, y[1]) - min(p[i].second, y[1]));
		if (ma <= r1 || mb <= r2)
			continue;
		 if (ma+r2<mb+r1)
			r1 = ma;
		else
			r2 = mb;
	}
	cout << r1 + r2 << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int> pii;
typedef long long ll;

#define pb push_back
#define pf push_front
#define mp make_pair
#define sz(a) (int)a.size()
#define i128 __int128
#define INF 0x3f3f3f3f
// LLONG_MIN LLONG_MaX INT_MIN INT_MaX

pair <ll, ll> d[2020];

ll getdis(ll x, ll y, ll p1, ll p2){
    return (x - p1)*(x - p1) + (y - p2)*(y - p2);
}

int main(){
    int n, x1, y1, x2, y2;
    cin >> n >> x1 >> y1 >> x2 >> y2;
    for(int i=0; i<n; i++){
        int x, y;
        scanf("%d %d", &x, &y);
        d[i] = make_pair(getdis(x1, y1, x, y), getdis(x2, y2, x, y));
    }
    sort(d, d+n+1);
    ll mn = 1e18;
    for(int i=0; i<=n; i++){
        ll circle2 = 0;
        for(int j=i+1; j<=n; j++){
            circle2 = max(circle2, d[j].second);
        }
        mn = min(mn, d[i].first + circle2);
    }
    cout << mn << endl;
}


#include <bits/stdc++.h>

using namespace std;
typedef pair <int,int> pii;
typedef long long ll;

#define pb push_back
#define sz(a) (int)a.size()
#define INF 0x3f3f3f3f
#define st first
#define nd second
#define fio ios::sync_with_stdio(false), cin.tie(0)
#define DEBUG(x) printf("Here: %d\n", x), exit(0);
// LLONG_MIN LLONG_MAX INT_MIN INT_MAX
// const int MAX_V = 100100;

vector <pair <ll, ll> > d;

ll getdis(pii a, pii b){
    return (0LL + a.st - b.st) * (a.st - b.st) + (0LL + a.nd - b.nd) * (a.nd - b.nd);
}

int main(){
    int n;
    pii a, b;
    scanf("%d%d%d%d%d", &n, &a.st, &a.nd, &b.st, &b.nd);
    ll mn = 1e18;
    for(int i = 0; i < n; i++){
        pii c;
        scanf("%d%d", &c.st, &c.nd);
        ll d1 = getdis(c, a);
        ll d2 = getdis(c, b);
        d.pb({d1, d2});
    }
    sort(d.begin(), d.end());
    for(int i = 0; i < sz(d); i++){
        ll r2 = 0;
        for(int j = i + 1; j < sz(d); j++){
            r2 = max(r2, d[j].nd);
        }
        mn = min(mn, d[i].st + r2);
    }
    printf("%lld\n", mn);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(a) (int)a.size()
#define ll long long
#define INF 0x3f3f3f3f

pair <ll, ll> d[2020];

int getdis(int x, int y, int p1, int p2)
{
    return (x-p1)*(x-p1) + (y-p2)*(y-p2);
}

int main(){
    int i,j,n;
    int x1,y1,x2,y2;
    cin>>n>>x1>>y1>>x2>>y2;
    for(i=0;i<n;i++)
    {
        int x,y;
        scanf("%d %d",&x,&y);
        d[i]=make_pair(getdis(x1,y1,x,y),getdis(x2,y2,x,y));
    }
    sort(d,d+n);
    ll mn=INF;
    for(i=0;i<n;i++){
        int circle2=0;
        for(j=i+1;j<n;j++)
            circle2=max(circle2,d[j].second);
        mn=min(mn,d[i].first+circle2);
    }

    cout<<mn<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef pair<int,int> pii;
typedef long long ll;

#define pb push_back
#define pf push_front
#define mp make_pair
#define sz(a) (int)a.size()
#define i128 __int128
#define INF 0x3f3f3f3f
// LLONG_MIN LLONG_MaX INT_MIN INT_MaX

pair <ll, ll> d[2020];

ll getdis(ll x, ll y, ll p1, ll p2)
{
    return (x-p1)*(x-p1) + (y-p2)*(y-p2);
}

int main(){
    int i,j,n;
    int x1,y1,x2,y2;
    cin>>n>>x1>>y1>>x2>>y2;
    for(i=0;i<n;i++)
    {
        int x,y;
        scanf("%d %d",&x,&y);
        d[i]=make_pair(getdis(x1,y1,x,y),getdis(x2,y2,x,y));
    }
    sort(d,d+n+1);
    ll mn=1e18;
    for(i=0;i<n;i++){
        ll circle2=0;
        for(j=i+1;j<=n;j++)
            circle2=max(circle2,d[j].second);
        mn=min(mn,d[i].first+circle2);
    }
    cout<<mn<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef pair <int,int> pii;
typedef long long ll;

#define pb push_back
#define sz(a) (int)a.size()
#define INF 0x3f3f3f3f
#define st first
#define nd second
#define fio ios::sync_with_stdio(false), cin.tie(0)
#define DEBUG(x) printf("Here: %d\n", x), exit(0);
// LLONG_MIN LLONG_MAX INT_MIN INT_MAX
// const int MAX_V = 100100;

vector <pair <ll, ll> > d;

ll getdis(pii a, pii b){
    return (0LL + a.st - b.st) * (a.st - b.st) + (0LL + a.nd - b.nd) * (a.nd - b.nd);
}

int main(){
    int n;
    pii a, b;
    scanf("%d%d%d%d%d", &n, &a.st, &a.nd, &b.st, &b.nd);
    ll mn = 1e18;
    d.pb({0, 0});
    for(int i = 0; i < n; i++){
        pii c;
        scanf("%d%d", &c.st, &c.nd);
        ll d1 = getdis(c, a);
        ll d2 = getdis(c, b);
        d.pb({d1, d2});
    }
    sort(d.begin(), d.end());
    for(int i = 0; i < sz(d); i++){
        ll r2 = 0;
        for(int j = i + 1; j < sz(d); j++){
            r2 = max(r2, d[j].nd);
        }
        mn = min(mn, d[i].st + r2);
    }
    printf("%lld\n", mn);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(a) (int)a.size()
#define ll long long
#define INF 0x3f3f3f3f

pair <ll, ll> d[2020];

ll getdis(ll x, ll y, ll p1, ll p2)
{
    return (x-p1)*(x-p1) + (y-p2)*(y-p2);
}

int main(){
    int i,j,n;
    int x1,y1,x2,y2;
    cin>>n>>x1>>y1>>x2>>y2;
    for(i=0;i<n;i++)
    {
        int x,y;
        scanf("%d %d",&x,&y);
        d[i]=make_pair(getdis(x1,y1,x,y),getdis(x2,y2,x,y));
    }
    sort(d,d+n);
    ll mn=INF;
    for(i=0;i<n;i++){
        ll circle2=0;
        for(j=i+1;j<n;j++)
            circle2=max(circle2,d[j].second);
        mn=min(mn,d[i].first+circle2);
    }

    cout<<mn<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef pair <int,int> pii;
typedef long long ll;

#define pb push_back
#define sz(a) (int)a.size()
#define INF 0x3f3f3f3f
#define st first
#define nd second
#define fio ios::sync_with_stdio(false), cin.tie(0)
#define DEBUG(x) printf("Here: %d\n", x), exit(0);
// LLONG_MIN LLONG_MAX INT_MIN INT_MAX
// const int MAX_V = 100100;

vector <pair <ll, ll> > d;

ll getdis(pii a, pii b){
    return (0LL + a.st - b.st) * (a.st - b.st) + (0LL + a.nd - b.nd) * (a.nd - b.nd);
}

int main(){
    int n;
    pii a, b;
    scanf("%d%d%d%d%d", &n, &a.st, &a.nd, &b.st, &b.nd);
    ll mn = 1e18;
    for(int i = 0; i < n; i++){
        pii c;
        scanf("%d%d", &c.st, &c.nd);
        ll d1 = getdis(c, a);
        ll d2 = getdis(c, b);
        d.pb({d1, d2});
    }
    if(n == 1){
        printf("%lld\n", min(d[0].st, d[0].nd));
        return 0;
    }
    sort(d.begin(), d.end());
    for(int i = 0; i < sz(d); i++){
        ll r2 = 0;
        for(int j = i + 1; j < sz(d); j++){
            r2 = max(r2, d[j].nd);
        }
        mn = min(mn, d[i].st + r2);
    }
    printf("%lld\n", mn);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(a) (int)a.size()
#define ll long long
#define INF 0x3f3f3f3f

pair <int, int> d[2020];

int getdis(int x, int y, int p1, int p2)
{
    return (x-p1)*(x-p1) + (y-p2)*(y-p2);
}

int main(){
    int i,j,n;
    int x1,y1,x2,y2;
    cin>>n>>x1>>y1>>x2>>y2;
    for(i=0;i<n;i++)
    {
        int x,y;
        scanf("%d %d",&x,&y);
        d[i]=make_pair(getdis(x1,y1,x,y),getdis(x2,y2,x,y));
    }
    sort(d,d+n);
    int mn=INF;
    for(i=0;i<n;i++){
        int circle2=0;
        for(j=i+1;j<n;j++)
            {
                circle2=max(circle2,d[j].second);
                mn=min(mn,d[i].first+circle2);
            }
    }

    cout<<mn<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(a) (int)a.size()
#define ll long long
#define INF 0x3f3f3f3f

pair <ll, ll> d[2020];

ll getdis(ll x, ll y, ll p1, ll p2)
{
    return (x-p1)*(x-p1) + (y-p2)*(y-p2);
}

int main(){
    int i,j,n;
    int x1,y1,x2,y2;
    cin>>n>>x1>>y1>>x2>>y2;
    for(i=0;i<n;i++)
    {
        int x,y;
        scanf("%d %d",&x,&y);
        d[i]=make_pair(getdis(x1,y1,x,y),getdis(x2,y2,x,y));
    }
    sort(d,d+n+1);
    ll mn=1e18;
    for(i=0;i<=n;i++){
        ll circle2=0;
        for(j=i+1;j<=n;j++)
            circle2=max(circle2,d[j].second);
        mn=min(mn,d[i].first+circle2);
    }
    cout<<mn<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(a) (int)a.size()
#define ll long long
#define INF 0x3f3f3f3f

pair <ll, ll> d[2020];

ll getdis(ll x, ll y, ll p1, ll p2)
{
    return (x-p1)*(x-p1) + (y-p2)*(y-p2);
}

int main(){
    int i,j,n;
    int x1,y1,x2,y2;
    cin>>n>>x1>>y1>>x2>>y2;
    for(i=0;i<n;i++)
    {
        int x,y;
        scanf("%d %d",&x,&y);
        d[i]=make_pair(getdis(x1,y1,x,y),getdis(x2,y2,x,y));
    }
    sort(d,d+n);
    ll mn=1e18;
    for(i=0;i<n;i++){
        ll circle2=0;
        for(j=i+1;j<n;j++)
            circle2=max(circle2,d[j].second);
        mn=min(mn,d[i].first+circle2);
    }

    cout<<mn<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(a) (int)a.size()
#define ll long long
#define INF 0x3f3f3f3f

pair <ll, ll> d[2020];

int getdis(int x, int y, int p1, int p2)
{
    return (x-p1)*(x-p1) + (y-p2)*(y-p2);
}

int main(){
    int i,j,n;
    int x1,y1,x2,y2;
    cin>>n>>x1>>y1>>x2>>y2;
    for(i=0;i<n;i++)
    {
        int x,y;
        scanf("%d %d",&x,&y);
        d[i]=make_pair(getdis(x1,y1,x,y),getdis(x2,y2,x,y));
    }
    sort(d,d+n);
    ll mn=INF;
    for(i=0;i<n;i++){
        ll circle2=0;
        for(j=i+1;j<n;j++)
            circle2=max(circle2,d[j].second);
        mn=min(mn,d[i].first+circle2);
    }

    cout<<mn<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef pair <int,int> pii;
typedef long long ll;

#define pb push_back
#define sz(a) (int)a.size()
#define INF 0x3f3f3f3f
#define st first
#define nd second
#define fio ios::sync_with_stdio(false), cin.tie(0)
#define DEBUG(x) printf("Here: %d\n", x), exit(0);
// LLONG_MIN LLONG_MAX INT_MIN INT_MAX
// const int MAX_V = 100100;

vector <pair <ll, ll> > d;

ll getdis(pii a, pii b){
    return (0LL + a.st - b.st) * (a.st - b.st) + (0LL + a.nd - b.nd) * (a.nd - b.nd);
}

int main(){
    int n;
    pii a, b;
    scanf("%d%d%d%d%d", &n, &a.st, &a.nd, &b.st, &b.nd);
    ll mn = 1e18;
    for(int i = 0; i < n; i++){
        pii c;
        scanf("%d%d", &c.st, &c.nd);
        ll d1 = getdis(c, a);
        ll d2 = getdis(c, b);
        d.pb({d1, d2});
    }
    if(n == 1){
        printf("%d\n", min(d[0].st, d[0].nd));
        return 0;
    }
    sort(d.begin(), d.end());
    for(int i = 0; i < sz(d); i++){
        ll r2 = 0;
        for(int j = i + 1; j < sz(d); j++){
            r2 = max(r2, d[j].nd);
        }
        mn = min(mn, d[i].st + r2);
    }
    printf("%lld\n", mn);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define sz(a) (int)a.size()
#define ll long long
#define INF 0x3f3f3f3f

pair <int, int> point[2020];
int d1[2020],d2[2020];

int main(){
    int i,n,temp,x;
    int x1,y1,x2,y2;
    cin>>n>>x1>>y1>>x2>>y2;
    for(i=0;i<n;i++)
    {
        scanf("%d %d",&point[i].first,&point[i].second);
    }
    for(i=0;i<n;i++)
    {
        d1[i]=(x1-point[i].first)*(x1-point[i].first)+(y1-point[i].second)*(y1-point[i].second);
        d2[i]=(x2-point[i].first)*(x2-point[i].first)+(y2-point[i].second)*(y2-point[i].second);
    }
    sort(d1,d1+n);
    sort(d2,d2+n);

    int mn=INF;
    for(i=n-2;i>=0;i--)
    {
        int j=n-i-2;
        mn=min(mn,d1[i]+d2[j]);
    }
    mn=min(mn,d1[n-1]);
    mn=min(mn,d2[n-1]);
    cout<<mn<<endl;
    return 0;
}


#include<iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main(){
	pair<long long, long long> d[2000];
	int n, x1, x2, y1, y2;
	int x, y, i, j;
	cin >> n >> x1 >> y1 >> x2 >> y2;
	for (int i = 0; i < n; i++){
		cin >> x >> y;
		d[i].first = (x - x1)*(x - x1) + (y - y1)*(y - y1);
		d[i].second = (x - x2)*(x - x2) + (y - y2)*(y - y2);
	}
	if (n == 1){
		cout << min(d[0].first, d[0].second) << endl;
		return 0;
	}
	sort(d, d + n);
	long long minD = 0x3f3f3f3f;
	for (i = 0; i < n; i++){
		long long maxD = 0;
		for (j = i + 1; j < n; j++){
			maxD = max(maxD, d[j].second);
		}
		minD = min(minD, maxD + d[i].first);
	}
	printf("%I64d\n", minD);

	return 0;
}


#include<iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main(){
	pair<long long, long long> d[2000];
	int n, x1, x2, y1, y2;
	int x, y, i, j;
	cin >> n >> x1 >> y1 >> x2 >> y2;
	for (int i = 0; i < n; i++){
		cin >> x >> y;
		d[i].first = (x - x1)*(x - x1) + (y - y1)*(y - y1);
		d[i].second = (x - x2)*(x - x2) + (y - y2)*(y - y2);
	}
	if (n == 1){
		cout << min(d[0].first, d[0].second) << endl;
		return 0;
	}
	sort(d, d + n);
	long long minD = ~0ull >> 1;
	// long long minD = 0x3f3f3f3f;
	for (i = 0; i < n; i++){
		long long maxD = 0;
		for (j = i + 1; j < n; j++){
			maxD = max(maxD, d[j].second);
		}
		minD = min(minD, maxD + d[i].first);
	}
	printf("%I64d\n", minD);

	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#include<map>
#define INF 0x7fffffff
struct flower{
    long long d1,d2;
}dot[2020];
bool cmp(flower a,flower b){
    return a.d1<b.d1;
}
using namespace std;
int main(){
    long long n,x1,x2,y1,y2,x,y,r1=0,r2=0;
    long long minsum=INF;
    cin>>n>>x1>>y1>>x2>>y2;
    for(int i=0;i<n;i++){
        scanf("%lld%lld",&x,&y);
        dot[i].d1=(x-x1)*(x-x1)+(y-y1)*(y-y1);
        dot[i].d2=(x-x2)*(x-x2)+(y-y2)*(y-y2);
        //printf("%d %d\n",dot[i].d1,dot[i].d2);
    }
    sort(dot,dot+n,cmp);
    for(int i=0;i<n;i++){
        long long maxd2=0;
        for(int j=i+1;j<n;j++){
            if(dot[j].d2>maxd2){
                    maxd2=dot[j].d2;
            }
        }
        minsum=min(minsum,dot[i].d1+maxd2);
    }
    printf("%lld\n",minsum);
}


#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;
int n;
const ll INF=900000000000000000;
ll ox1,ox2,oy1,oy2;
typedef pair<ll,ll> pa;
pa a[2005];
ll getDis(ll x,ll y,ll ox,ll oy){
	return (x-ox)*(x-ox)+(y-oy)*(y-oy);
}
bool cmp(pa a,pa b){
	if(a.first==b.first)
		return a.second>b.second;
	return a.first>b.first;
}
bool cmp2(const pa& a,const pa& b){
	if(a.second==b.second)
		return a.first>b.first;
	return a.second>b.second;
}
int main(){
//	freopen("in.txt","r",stdin);
	scanf("%d%lld%lld%lld%lld",&n,&ox1,&oy1,&ox2,&oy2);
	for(int i=1;i<=n;i++){
		ll x,y;
		scanf("%lld%lld",&x,&y);
		a[i].first=getDis(x,y,ox1,oy1);
		a[i].second=getDis(x,y,ox2,oy2);
	}
	if(n==1){
		printf("%lld\n",min(a[1].first,a[1].second));
		return 0;
	}
	sort(a+1,a+n+1,cmp);
//	for(int i=1;i<=n;i++)
//		printf("i:%d, first:%lld,second:%lld\n",i,a[i].first,a[i].second);
	ll tr=0,ans1=INF;
	for(int i=1;i<n;i++){
		tr=max(tr,a[i].second);
		ans1=min(ans1,a[i+1].first+tr);
//		printf("tr%lld,ans:%lld\n",tr,ans1);
	}
	tr=0;
	ll ans2=INF;
	sort(a+1,a+n+1,cmp2);
	for(int i=1;i<n;i++){
		tr=max(tr,a[i].first);
		ans2=min(ans2,a[i+1].second+tr);
//		printf("tr%lld,ans2:%lld\n",tr,ans2);
	}
	printf("%lld\n",min(ans1,ans2));
	return 0;
}


#include<iostream>
#include<string>
#include<cstring>
#include<algorithm>

using namespace std;
  int n,x1,x2,y1,y2;
struct node{
  long long r1,r2;
}p[2005];
long long r1d(long long x ,long long y){
  return (x-x1)*(x-x1)+(y-y1)*(y-y1);
}
long long r2d(long long x, long long y){
  return (x-x2)*(x-x2)+(y-y2)*(y-y2);
}
bool cmp (node x, node y){
  if(x.r1==y.r1) return x.r2>y.r2;
  else return x.r1<y.r1;
}

int main(){
  long long x,y;
  long long ans=1e18,sum=0,r3=0;
  cin >>n>>x1>>y1>>x2>>y2;
  p[0].r1=0;p[0].r2=0;
  for(int i=1;i<=n;i++){
  cin>>x>>y;
  p[i].r1=r1d(x,y);
  p[i].r2=r2d(x,y);
  }
  sort(p,p+n+1,cmp);
  for(int i=0;i<=n;i++){
  sum=0;
  sum+=p[i].r1;
  for(int j=i+1;j<=n;j++){
  r3=max(r3,p[j].r2);
  }
  sum+=r3;
  ans=min(sum,ans);
  }
  cout<<ans<<endl;
  return 0;
}


#include<iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main(){
	pair<long long, long long> d[2000];
	int n, x1, x2, y1, y2;
	int x, y, i, j;
	cin >> n >> x1 >> y1 >> x2 >> y2;
	for (int i = 0; i < n; i++){
		scanf("%lld%lld", &x, &y);
		d[i].first = (x - x1)*(x - x1) + (y - y1)*(y - y1);
		d[i].second = (x - x2)*(x - x2) + (y - y2)*(y - y2);
	}
	if (n == 1){
		cout << min(d[0].first, d[0].second) << endl;
		return 0;
	}
	sort(d, d + n);
	long long minD = 0x3f3f3f3f;
	for (i = 0; i < n; i++){
		long long maxD = 0;
		for (j = i + 1; j < n; j++){
			maxD = max(maxD, d[j].second);
		}
		minD = min(minD, maxD + d[i].first);
	}
	printf("%I64d\n", minD);

	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;
int n;
const ll INF=900000000000000000;
ll ox1,ox2,oy1,oy2;
typedef pair<ll,ll> pa;
pa a[2005];
ll getDis(ll x,ll y,ll ox,ll oy){
	return (x-ox)*(x-ox)+(y-oy)*(y-oy);
}
bool cmp(pa a,pa b){
	if(a.first==b.first)
		return a.second>b.second;
	return a.first>b.first;
}
bool cmp2(const pa& a,const pa& b){
	if(a.second==b.second)
		return a.first>b.first;
	return a.second>b.second;
}
int main(){
//	freopen("in.txt","r",stdin);
	scanf("%d%lld%lld%lld%lld",&n,&ox1,&oy1,&ox2,&oy2);
	for(int i=1;i<=n;i++){
		ll x,y;
		scanf("%lld%lld",&x,&y);
		a[i].first=getDis(x,y,ox1,oy1);
		a[i].second=getDis(x,y,ox2,oy2);
	}
	if(n==1){
		printf("%lld\n",min(a[1].first,a[1].second));
		return 0;
	}
	sort(a+1,a+n+1,cmp);
//	for(int i=1;i<=n;i++)
//		printf("i:%d, first:%lld,second:%lld\n",i,a[i].first,a[i].second);
	ll tr=0,ans1=a[1].first;
	for(int i=1;i<n;i++){
		tr=max(tr,a[i].second);
		ans1=min(ans1,a[i+1].first+tr);
//		printf("tr%lld,ans:%lld\n",tr,ans1);
	}
	tr=0;
	ll ans2=a[1].second;
	sort(a+1,a+n+1,cmp2);
	for(int i=1;i<n;i++){
		tr=max(tr,a[i].first);
		ans2=min(ans2,a[i+1].second+tr);
//		printf("tr%lld,ans2:%lld\n",tr,ans2);
	}
	printf("%lld\n",min(ans1,ans2));
	return 0;
}


import math
a = input().split()
a = [int(i) for i in a]

math.ceil(a[1]/a[0])


a , b = (input().split())
a = int(a)
b = int(b)
print( (b + a - 1) // a)


a , b = (input().split())
a = int(a)
b = int(b)
print( (b + a - 1) // b)


n,k = map(int,input().split())
print(-(-k//n))


n,k=[int(el) for el in input().split()]
if k<n:
    print (1)
    raise SystemExit
if k%n==0:
    print (int(k/n))
else:
    print (int(k/n)+1)


n,k=[int(el) for el in input().split()]
if k%n==0:
    print (int(k/n))
else:
    print (int(k/n)+1)


n,k=[int(el) for el in input().split()]
print((k + n - 1) // n)


import atexit
import io
import sys

buff = io.StringIO()
sys.stdout = buff

@atexit.register
def write_output():
    sys.__stdout__.write(buff.getvalue())

def main():
    n, k = map(int, input().split())

    if n >= k:
        print(1)
        return
    elif n == 1:
        print(k)
        return

    low = 0
    high = int(1e20)

    while(low <= high):
        mid = (low + high) // 2
        area = n * mid
        if area >= k:
            high = mid - 1
        else:
            low = mid + 1
    print(mid)

if __name__ == '__main__':
    main()


import atexit
import io
import sys

buff = io.StringIO()
sys.stdout = buff

@atexit.register
def write_output():
    sys.__stdout__.write(buff.getvalue())

def main():
    n, k = map(int, input().split())

    if n >= k:
        print(1)
        return

    low = 0
    high = int(1e20)

    while(low <= high):
        mid = (low + high) // 2
        area = n * mid
        if area >= k:
            high = mid - 1
        else:
            low = mid + 1
    print(mid)

if __name__ == '__main__':
    main()


import atexit
import io
import sys

buff = io.StringIO()
sys.stdout = buff

@atexit.register
def write_output():
    sys.__stdout__.write(buff.getvalue())

def main():
    n, k = map(int, input().split())

    if n >= k:
        print(1)
        return
    elif n == 1:
        print(k)
        return

    low = 0
    high = int(1e20)

    while(low <= high):
        mid = (low + high) // 2
        area = n * mid
        if area >= k:
            high = mid - 1
        else:
            low = mid + 1
    print(low)

if __name__ == '__main__':
    main()


n,k = map(int,input().split())
if(k<n):
    print(1)
else:
    print(k//n)


n,k = map(int,input().split())
if(k<s):
    print(1)
else:
    print(k//n)


n,k = map(int,input().split())
t = (2*n+1)
s = t//2
if(k<s):
    print(1)
else:
    print(k//s)


n,k = map(int,input().split())
if(k<n):
    print(1)
else:
    if(k%n==0):
        print(k//n)
    else:
        print(k//n+1)


n, k = (int(x) for x in input().split())
if k < n:
    print(1)
else:
    print(k//n + min(k%n,1))


n, k = map(int, input().split())
print((k+n-1)//n)


n, k = map(int, input().split())
print(math.ceil(k/n))


from math import ceil
n, k = map(int, input().split())
print(ceil(k/n))


n,k = map(int, input().split())
if k%n:
    print(k//n+1)
else:
    print(k//n)


import math
n,k=map(int,input().split())
#s=[int(x) for x in input().split()]
#for i in range(0,len(s)):
ans=math.ceil(k/n)
print(ans)


import math
n,k=map(int,input().split())
#s=[int(x) for x in input().split()]
#for i in range(0,len(s)):
ans=k//n
if(k%n!=0):
    ans=ans+1
print(ans)
#ans=math.ceil(k/n)
#print(ans)


#https://codeforces.com/contest/1036/problem/A
from math import ceil
n,k=map(int,input().split())
print(k//n +1 if (k//n)*n < k else k//n )


#https://codeforces.com/contest/1036/problem/A
from math import ceil
n,k=map(int,input().split())
print(ceil(k/n))


Input=lambda:map(int,input().split())
n, k = Input()
print(k//n if k % n == 0 else k//n+1)


Input=lambda:map(int,input().split())
x, y = Input()
print(max(x,y) // min(x,y))


from math import ceil
Input=lambda:map(int,input().split())

n, k = Input()
if k < n:
        print(1)
        exit()

if k % n == 0:
        print(k//n)
else:
        print(k//n+1)
#print(1000000000000000/999999999999999)


from math import ceil
Input=lambda:map(int,input().split())
n, k = Input()
if k < n:
        print(1)
        exit()

print(ceil(k/n))


from math import ceil
Input=lambda:map(int,input().split())

n, k = Input()
if k < n:
        print(1)
        exit()

print(ceil(k/n))

if k % n == 0:
        print(k//n)
else:
        print(k//n+1)
#print(1000000000000000/999999999999999)


def main():
    n, k = map(int, input().split(" "))
    print(k // n + (1 if k % n != 0 else 0))

if __name__ == "__main__":
    exit(main())


n,k=map(int,input().split())
r=k//n
m=k%n
if m>0:
    r+=1
print(r)


n,m = map(int,input().split())
print((m+n-1)//n)


n, k = (int(x) for x in input().split())

print(n // k + n % k)


n, k = (int(x) for x in input().split())

print((k // n) + (1 if k % n != 0 else 0))


n, k = (int(x) for x in input().split())

print(k // n + k % n)


"""
#If FastIO not needed, used this and don't forget to strip
#import sys, math
#input = sys.stdin.readline
"""

import os
import sys
from io import BytesIO, IOBase
import heapq as h
from bisect import bisect_left, bisect_right

from types import GeneratorType
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        import os
        self.os = os
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            self.os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

from collections import defaultdict as dd, deque as dq, Counter as dc
import math, string

def getInts():
    return [int(s) for s in input().split()]

def getInt():
    return int(input())

def getStrs():
    return [s for s in input().split()]

def getStr():
    return input()

def listStr():
    return list(input())

MOD = 998244353

"""
N odd vertices, each move is an increase of 1
math.ceil(N/K)
"""

def solve():
    N, K = getInts()
    return K//N if K % N == 0 else K//N + 1

#for _ in range(getInt()):
print(solve())


"""
#If FastIO not needed, used this and don't forget to strip
#import sys, math
#input = sys.stdin.readline
"""

import os
import sys
from io import BytesIO, IOBase
import heapq as h
from bisect import bisect_left, bisect_right

from types import GeneratorType
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        import os
        self.os = os
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            self.os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

from collections import defaultdict as dd, deque as dq, Counter as dc
import math, string

def getInts():
    return [int(s) for s in input().split()]

def getInt():
    return int(input())

def getStrs():
    return [s for s in input().split()]

def getStr():
    return input()

def listStr():
    return list(input())

MOD = 998244353

"""
N odd vertices, each move is an increase of 1
math.ceil(N/K)
"""

def solve():
    N, K = getInts()
    print(math.ceil(K/N))
    return

#for _ in range(getInt()):
solve()


n, k = map(int, input().split())
v=2*n+1
tri=n

if tri >= k:
    print(1)
else:
    print(k//n + (1 if k%n>0 else 0))


n, k = map(int, input().split())
v=2*n+1
tri=n

if tri <= k:
    print(1)
else:
    from math import ceil
    print(ceil(k/n))


n, k = map(int, input().split())
v=2*n+1
tri=n

if tri >= k:
    print(1)
else:
    ans=0
    while k >= n:
        k-=n
        ans += 1
    print(ans+1)


n, k = map(int, input().split())
v=2*n+1
tri=n

if tri >= k:
    print(1)
else:
    ans=0
    while k > n:
        k-=n
        ans += 1
    print(ans+1)


n, k = map(int, input().split())
v=2*n+1
tri=n

if tri >= k:
    print(1)
else:
    from math import ceil
    print(ceil(k/n))


q = int(input())

for i in range(q):
    n, m, k = map(int, input().split())
    if (n < m): n, m = m, n
    if (n % 2 != m % 2):
        k -= 1
        n -= 1
    elif (n % 2 != k % 2):
        k -= 2
        n -= 1
        m -= 1
    print(-1 if k < n else k)


n, k = map(int, input().split())
print((k + n - 1) // n)


def main():
    [n, k] = map(int, input().split())
    a = k // n

    if a * n < k:
        a += 1

    print(a)

if __name__ == '__main__':
    main()


from math import ceil

def main():
    [n, k] = map(int, input().split())
    print(ceil(k / n))

if __name__ == '__main__':
    main()


def f(ll):
    n,k = ll    #3e5
    return (k+n-1)//n

l = list(map(int,input().split()))
print(f(l))


import sys
inputs = sys.stdin.readline

k, n = map(int, inputs().split())
if n % k == 0:
    print(n//k)
else:
    print((n//k)+1)

# Codeforcesian
# ♥


import sys
inputs = sys.stdin.readline

k, n = map(int, inputs().split())
if n % k == 0:
    print(n//k)
else:
    print(max(n//(k+1), 1))

# Codeforcesian
# ♥


import sys
import math
import bisect
import itertools
import random

def main():
    n, m = map(int, input().split())
    ans = math.ceil(m / n)
    print(ans)

if __name__ == "__main__":
    main()


import sys
import math
import bisect
import itertools
import random

def main():
    n, m = map(int, input().split())
    ans = (m + n - 1) // n
    print(ans)

if __name__ == "__main__":
    main()


n, k = [int(x) for x in input().split(' ')]

ans = k // n + int(k % n != 0)
print(ans)


#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File              : A.py
# Author            : JCHRYS <jchrys@me.com>
# Date              : 09.10.2019
# Last Modified Date: 09.10.2019
# Last Modified By  : JCHRYS <jchrys@me.com>
n, k = map(int, input().split())
print(max(1, int(k/n) + (int(k/n) != k/n)))


#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File              : A.py
# Author            : JCHRYS <jchrys@me.com>
# Date              : 09.10.2019
# Last Modified Date: 09.10.2019
# Last Modified By  : JCHRYS <jchrys@me.com>
n, k = map(int, input().split())
print((k + n - 1) // n) # equals to ceil(k/n);


n,k=map(int,input().split( ))
if k%n==0:
    print(int(k//n))
else:
    print(int(k//n)+1)


#!/usr/bin/python3

l = input().split()

n = int(l[0])
k = int(l[1])

a = 1
b = k
while a < b:
  c = (a + b) // 2
  if c * n >= k:
    b = c
  else:
    a = c + 1

print(a)


import sys, math

n, m = map(int, sys.stdin.readline().split())
if n >= m:
    print(1)
else:
    print(m // n if m % n == 0 else m // n + 1)


from math import ceil
n, k = map(int, input().split())
print(ceil(k / n))


n, k = map(int, input().split())
print((k - 1) // n + 1)


s=input().split(" ")
n=int(s[0])
k=int(s[1])
low=1
high=1000000000000000000;mid=0;ans=1;
while(low<=high):
	mid=(low+high)//2
	tot=mid*n
	if(tot>=k):
		ans=mid;high=mid-1;
	else:
		low=mid+1
print(ans)


n,m = map(int,input().split())
if m%n==0:
    print(m//n)
else:
    print(m//n +1)


n,k=list(map(int,input().split()))
ans=1 if k<=n else int(k/n)
print(ans)


import math

a,b = map(int,input().split())
print(b//a +(b%a!=0))


import math

a,b = map(int,input().split())
print(math.ceil(b/a))


n, k = map(int, input().split())
if k <= n:
    print(1)
else:
    print((k//n) + 1 if k % n != 0 else (k//n))


from math import *
n,k=map(int,input().split())
print(int(ceil(k/n)))


from math import *
n,k=map(int,input().split())
print((k+n-1)//n)


a,b=map(int,input().split())
if (b%a)==0:
    ans=b//a
else:
    ans=b//a
    ans+=1
print (ans)


n,k=[int(i) for i in input().split()]

if(n>=k):
    print(1)
else:
    print(k//n)


n,k=[int(i) for i in input().split()]

if(n>=k):
    print(1)
else:
    if(k%n==0):
        print(k//n)
    else:
        print(k//n+1)


from math import ceil

if __name__ == '__main__':
    n, k = [int(__) for __ in input().strip().split()]
    if k <= n:
        print(1)
    else:
        print(ceil(k / n))


if __name__ == '__main__':
    n, k = [int(__) for __ in input().strip().split()]
    if k <= n:
        print(1)
    else:
        print(k // n)


if __name__ == '__main__':
    n, k = [int(__) for __ in input().strip().split()]
    h = 1
    while n * h < k:
        h += 1
    print(h)


def check(n, x, k):
    if n * x < k:
        return False
    else:
        return True

if __name__ == '__main__':
    n, k = [int(__) for __ in input().strip().split()]
    # h = 1
    # while n * h < k:
    #     h += 1
    # print(h)
    start, end = 1, k
    mid = (start + end) // 2
    while start <= end:
        if check(n, mid, k):
            end = mid - 1
        else:
            start = mid + 1
        mid = (start + end) // 2
    print(start)

# mid = (self.start + self.end) // 2
# while self.start <= self.end:
#     if self.check(mid):
#         self.start = mid + 1
#     else:
#         self.end = mid - 1
#     mid = (self.start + self.end) // 2
# return self.start if self.check(self.start) else self.start - 1


n, k = map(int, input().split())
p = (k - 1) // n + 1
print(p)


n, k = map(int, input().split())
ans = k//n
if k % n != 0:
    ans += 1
print(ans)


from math import ceil
n, k = map(int, input().split())
print(int(ceil(k/n)))


import sys
f=sys.stdin
out=sys.stdout

n,k=map(int,f.readline().rstrip('\r\n').split())
if k%n==0:
	out.write(str(k//n)+'\n')
else:
	out.write(str((k//n)+1)+'\n')


#1036A
n, k = map(int, input().split())
print((k+n-1)//n)


#1036A
import math
n, k = map(int, input().split())
print(math.ceil(k/n))


def f():
    n,k = list(map(lambda x: int(x), input().split(' ')))
    print((k+n-1)//n)
f()


import math
n, k = map(int, input().split())
h = math.ceil(k / n)
print(h)


import math
n, k = map(int, input().split())
h = (k + n - 1) // n
print(h)


from math import ceil

n, m = map(int, input().split())
print(ceil(m / n))


n, m = map(int, input().split())
print(m // n + (1 if m % n else 0))


if __name__ == "__main__":
    n, k = tuple(map(int, input().split()))
    if k%n:
        print(k//n+1)
    else:
        print(k // n)


n, k = map(int, input().split())
if 2 * n + 1 >= 2 * k:
    print(1)
else:
    print(k // n)


n, k = map(int, input().split())
if 2 * n + 1 >= 2 * k:
    print(1)
else:
    for i in range((2 * n), 0, -2):
        if 2 * k % i == 0:
            print(2 * k // i)
            break


import math
n, k = map(int, input().split())
if 2 * n + 1 >= 2 * k:
    print(1)
else:
    print(int(math.ceil(k // n)))


import math
n, k = map(int, input().split())
if k % n == 0:
    print(k // n)
else:
    print(k // n + 1)


n, k = map(int, input().split())
if 2 * n + 1 >= k:
    print(1)
else:
    for i in range((2 * n), 0, -1):
        if 2 * k % i == 0:
            print(2 * k // i)
            break


import math
n, k = map(int, input().split())
if 2 * n + 1 >= 2 * k:
    print(1)
else:
    print(int(math.ceil(k / n)))


n, k = map(int, input().split())
s = 0
per_one = n
h = 0

while s < k:
    s += per_one
    h += 1
print(h)


n, k = map(int, input().split())

print((k + n - 1) // n)


n, k = map(int, input().split())
print((k + n - 1) // n)


#include <bits/stdc++.h>
using namespace std;
long long itn(long long x){
    if(x==0) return 0;
    if(x==1) return 1;
    long long res=0,j=1;
    while(j<=x) j*=2;
    j/=2;
    if((x-j+1)%2==1) res+=j;
    return res+itn(x-j);
}
int main(){
    long long n,x,m,i,a,b,xo=0;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>x>>m;
        a=itn(x-1);
        b=itn(x+m-1);
        a=a^b;
        xo=xo^a;
    }
    if(xo==0)cout<<"bolik";
    else cout<<"tolik";
}


#include<iostream>
#include<ctype.h>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<string.h>
#include<cstring>
#include<stack>
#include<queue>
#include<cassert>
#include<iterator>
#include<cmath>
#include<climits>
#include <bitset>

using namespace std ;

#define FOR(i,a,b) for(int i= (int)a; i< (int)b; ++i)
#define REP(i,n) FOR(i,0,n)

#define LL long long int
#define PII pair<int,int>
#define PB push_back
#define MP make_pair
#define INF 1000000000
#define mod 1000000007

int main()
{
   //freopen("input.txt","r",stdin);
   //freopen("output.txt","w",stdout);
   int t;
   scanf("%d",&t);
   LL n=0;
   REP(i,t)
   {
      LL x,m;
      cin>>x>>m;
      LL s1 = x*m;
      LL s2 = (m-1)*m;
      s2 = s2/2;
      n += s1;
      n += s2;
   }
   if(n%2==0)
      cout << "bolik" << endl;
   else
      cout << "tolik" << endl;
   return 0;
}


#include<iostream>
#include<ctype.h>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<string.h>
#include<cstring>
#include<stack>
#include<queue>
#include<cassert>
#include<iterator>
#include<cmath>
#include<climits>
#include <bitset>

using namespace std ;

#define FOR(i,a,b) for(int i= (int)a; i< (int)b; ++i)
#define REP(i,n) FOR(i,0,n)

#define LL long long int
#define PII pair<int,int>
#define PB push_back
#define MP make_pair
#define INF 1000000000
#define mod 1000000007

int main()
{
   //freopen("input.txt","r",stdin);
   //freopen("output.txt","w",stdout);
   int t;
   scanf("%d",&t);
   LL n=0;
   REP(i,t)
   {
      int x,m;
      cin>>x>>m;
      int s1 = x*m;
      int s2 = (m-1)*m;
      s2 = s2/2;
      n += s1;
      n += s2;
   }
   if(n%2==0)
      cout << "bolik" << endl;
   else
      cout << "tolik" << endl;
   return 0;
}


#include<iostream>
#include<ctype.h>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<string.h>
#include<cstring>
#include<stack>
#include<queue>
#include<cassert>
#include<iterator>
#include<cmath>
#include<climits>
#include <bitset>

using namespace std ;

#define FOR(i,a,b) for(int i= (int)a; i< (int)b; ++i)
#define REP(i,n) FOR(i,0,n)

#define LL long long int
#define PII pair<int,int>
#define PB push_back
#define MP make_pair
#define INF 1000000000
#define mod 1000000007

LL f(LL a) {
   LL res[] = {a,1,a+1,0};
   return res[a%4];
}

LL xor_range(LL a, LL b) {
   return f(a-1)^f(b);
}

int main()
{
   int n;
   cin>>n;
   LL ans=0;
   REP(i,n) {
      LL m,k;
      cin>>k>>m;
      ans = ans^(xor_range(k,k+m-1));
   }
   if(ans!=0) cout << "tolik" << endl;
   else cout << "bolik" << endl;
   return 0;
}


#include<iostream>
#include<ctype.h>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<string.h>
#include<cstring>
#include<stack>
#include<queue>
#include<cassert>
#include<iterator>
#include<cmath>
#include<climits>
#include <bitset>

using namespace std ;

#define FOR(i,a,b) for(int i= (int)a; i< (int)b; ++i)
#define REP(i,n) FOR(i,0,n)

#define LL long long int
#define PII pair<int,int>
#define PB push_back
#define MP make_pair
#define INF 1000000000
#define mod 1000000007

LL f(LL a) {
   LL res[] = {a,1,a+1,0};
   return res[a%4];
}

LL xor_range(LL a, LL b) {
   return f(a-1)^f(b);
}

int main()
{
   int n;
   cin>>n;
   LL ans=0;
   REP(i,n) {
      LL m,k;
      cin>>k>>m;
      ans = ans^(xor_range(k+1,k+m-1));
   }
   if(ans!=0) cout << "tolik" << endl;
   else cout << "bolik" << endl;
   return 0;
}


#include<iostream>
#include<ctype.h>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<string.h>
#include<cstring>
#include<stack>
#include<queue>
#include<cassert>
#include<iterator>
#include<cmath>
#include<climits>
#include <bitset>

using namespace std ;

#define FOR(i,a,b) for(int i= (int)a; i< (int)b; ++i)
#define REP(i,n) FOR(i,0,n)

#define LL long long int
#define PII pair<int,int>
#define PB push_back
#define MP make_pair
#define INF 1000000000
#define mod 1000000007

LL f(LL a) {
   LL res[] = {a,1,a+1,0};
   return res[a%4];
}

LL xor_range(LL a, LL b) {
   return f(a-1)^f(b);
}

int main()
{
   int n;
   cin>>n;
   LL ans=0;
   REP(i,n) {
      LL m,k;
      cin>>k>>m;
      ans = ans^(xor_range(k,k+m-1));
   }
   if(ans==0) cout << "tolik" << endl;
   else cout << "bolik" << endl;
   return 0;
}


#include<iostream>
#include<ctype.h>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<string.h>
#include<cstring>
#include<stack>
#include<queue>
#include<cassert>
#include<iterator>
#include<cmath>
#include<climits>
#include <bitset>

using namespace std ;

#define FOR(i,a,b) for(int i= (int)a; i< (int)b; ++i)
#define REP(i,n) FOR(i,0,n)

#define LL long long int
#define PII pair<int,int>
#define PB push_back
#define MP make_pair
#define INF 1000000000
#define mod 1000000007

typedef struct node{
   int v,id;
}node;

int a[1000000];
priority_queue<node> mn;
priority_queue<node> mx;

bool operator <(const node &a,const node &b)
{
   return a.v<=b.v;
}

int main()
{
   //freopen("input.txt","r",stdin);
   //freopen("output.txt","w",stdout);
   int t;
   scanf("%d",&t);
   REP(i,t)
   {
      cin>>a[i];
   }
   sort(a,a+t);
   int sum_a=0,sum_b=0;
   vector<node> m,n;
   int maxx=-1;

   REP(i,t)
   {
      if(i%2==0)
      {
         node x;
         x.v = a[i];
         x.id = i+1;
         m.PB(x);
         sum_a += a[i];
      }
      else
      {
         node x;
         x.v = a[i];
         x.id = i+1;
         n.PB(x);
         sum_b += a[i];
      }
      maxx = max(maxx,a[i]);
   }
   while(abs(sum_a-sum_b) > maxx)
   {
      node A,B;
      if(sum_a<sum_b)
      {
         A = m[0];
         B = n[n.size()-1];
         m.erase(m.begin()+0);
         n.erase(n.begin()+n.size()-1);
      }
      else
      {
         B = n[0];
         A = m[m.size()-1];
         n.erase(n.begin()+0);
         m.erase(m.begin()+m.size()-1);
      }
      sum_a = sum_a - A.v + B.v;
      sum_b = sum_b -B.v + A.v;
      sort(m.begin(),m.end());
      sort(n.begin(),n.end());
   }
   int sz1=0,sz2=0;
   cout << m.size() << endl;
   REP(i,m.size())
   {
         cout << m[i].id << " ";
   }
   cout << endl;
   cout << n.size() << endl;
   REP(i,n.size())
   {
         cout << n[i].id << " ";
   }
   cout << endl;

   return 0;
}


#include <cstdio>

long long int ile(long long int a)
{
	switch(a%4)
	{
		case 0: return a;
		case 1: return 1;
		case 2: return a+1;
		case 3: return 0;
	}
}

int main()
{
	int n;
	long long int wynik=0,x,m;
	scanf("%d",&n);
	for (int i=0;i<n;i++)
	{
		scanf("%l64d%l64d",&x,&m);
		wynik^=ile(x-1);
		wynik^=ile(x+m-1);
	}
	printf("%colik\n",wynik? 't':'b');
}


#include <cstdio>

long long int ile(long long int a)
{
	switch(a%4)
	{
		case 0: return a;
		case 1: return 1;
		case 2: return a+1;
		case 3: return 0;
	}
}

int main()
{
	int n;
	long long int wynik=0,x,m, lolz=0;
	scanf("%d",&n);
	for (int i=0;i<n;i++)
	{
		scanf("%64d%64d",&x,&m);
//		for (long long int j=x;j<x+m;j++) lolz^=j;
		wynik^=ile(x-1);
		wynik^=ile(x+m-1);
//		printf("%lld %lld\n",lolz,wynik);
	}
	printf("%colik\n",wynik > 0? 't':'b');
}


#include <cstdio>

long long int ile(long long int a)
{
	switch(a%4)
	{
		case 0: return a;
		case 1: return 1;
		case 2: return a+1;
		case 3: return 0;
	}
}

int main()
{
	int n;
	long long int wynik=0,x,m, lolz=0;
	scanf("%d",&n);
	for (int i=0;i<n;i++)
	{
		scanf("%lld%lld",&x,&m);
//		for (long long int j=x;j<x+m;j++) lolz^=j;
		wynik^=ile(x-1);
		wynik^=ile(x+m-1);
//		printf("%lld %lld\n",lolz,wynik);
	}
	printf("%colik\n",wynik > 0? 't':'b');
}


#include <cstdio>

long long int ile(long long int a)
{
	switch(a%4)
	{
		case 0: return a;
		case 1: return 1;
		case 2: return a+1;
		case 3: return 0;
	}
}

int main()
{
	int n;
	long long int wynik=0,x,m, lolz=0;
	scanf("%d",&n);
	for (int i=0;i<n;i++)
	{
		scanf("%l64d%l64d",&x,&m);
//		for (long long int j=x;j<x+m;j++) lolz^=j;
		wynik^=ile(x-1);
		wynik^=ile(x+m-1);
//		printf("%lld %lld\n",lolz,wynik);
	}
	printf("%colik\n",wynik > 0? 't':'b');
}


#include <iostream>

#include <cstdio>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <algorithm>

#include <cstring>

#include <cmath>

using namespace std;

#define Rep(i,n) for(int i=0;i<(n);++i)

#define For(i,a,b) for(int i=(a);i<=(b);++i)

#define Ford(i,a,b) for(int i=(a);i>=(b);--i)

#define fi first

#define se second

#define pb push_back

#define MP make_pair

typedef pair<int,int> PII;

typedef vector<int> VI;

long long get(long long x){
    long long res = 0;
    Rep(i,62) {
        // i set to 1
        if((x & (1LL<<i))!=0) {
            long long sl = (x >> (i+1)) * (1LL<<i) + (x&((1LL<<i)-1))+1;
            if(sl % 2 != 0) res |= 1LL<<i;
        }
        else {
            long long sl = (x >> (i+1)) * (1LL<<i);
            if(sl % 2 != 0) res |= 1LL << i;
        }
    }
    return res;
}

int main() {
    int n;

    scanf("%d",&n);
    long long res = 0;
    Rep(i,n){
        long long m,x;
        scanf("%lld%lld",&m,&x);
        long long r = get(x-1);
        r = r ^ get(m + x - 1);
        res ^= r;
    }
    if(res) cout << "tolik" << endl;
    else cout << "bolik" << endl;

    return 0;

}


#include <iostream>

#include <cstdio>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <algorithm>

#include <cstring>

#include <cmath>

using namespace std;

#define Rep(i,n) for(int i=0;i<(n);++i)

#define For(i,a,b) for(int i=(a);i<=(b);++i)

#define Ford(i,a,b) for(int i=(a);i>=(b);--i)

#define fi first

#define se second

#define pb push_back

#define MP make_pair

typedef pair<int,int> PII;

typedef vector<int> VI;

int main() {
    int n;

    scanf("%d",&n);
    long long res=0;
    Rep(i,n){
        long long m,x;
        cin>>m>>x;
        for(long long j=x;j<m+x;++j)res^=j;
    }
    if(res!=0)cout<<"tolik"<<endl;
    else cout<<"bolik"<<endl;

    return 0;

}


#include <iostream>

#include <cstdio>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <algorithm>

#include <cstring>

#include <cmath>

using namespace std;

#define Rep(i,n) for(int i=0;i<(n);++i)

#define For(i,a,b) for(int i=(a);i<=(b);++i)

#define Ford(i,a,b) for(int i=(a);i>=(b);--i)

#define fi first

#define se second

#define pb push_back

#define MP make_pair

typedef pair<int,int> PII;

typedef vector<int> VI;

long long get(long long x){
    long long res = 0;
    Rep(i,62) {
        // i set to 1
        if((x & (1LL<<i))!=0) {
            long long sl = (x >> (i+1)) * (1LL<<i) + (x&((1LL<<i)-1))+1;
            if(sl % 2 != 0) res |= 1LL<<i;
        }
        else {
            long long sl = (x >> (i+1)) * (1LL<<i);
            if(sl % 2 != 0) res |= 1LL << i;
        }
    }
    return res;
}

int main() {
    int n;

    scanf("%d",&n);
    long long res = 0;
    Rep(i,n){
        long long m,x;
        scanf("%I64d%I64d",&m,&x);
        long long r = get(x-1);
        r = r ^ get(m + x - 1);
        res ^= r;
    }
    if(res) cout << "tolik" << endl;
    else cout << "bolik" << endl;

    return 0;

}


#include <iostream>

#include <cstdio>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <algorithm>

#include <cstring>

#include <cmath>

using namespace std;

#define Rep(i,n) for(int i=0;i<(n);++i)

#define For(i,a,b) for(int i=(a);i<=(b);++i)

#define Ford(i,a,b) for(int i=(a);i>=(b);--i)

#define fi first

#define se second

#define pb push_back

#define MP make_pair

typedef pair<int,int> PII;

typedef vector<int> VI;

int main() {
    int n;

    scanf("%d",&n);
    int res=0;
    Rep(i,n){
        int m,x;
        cin>>m>>x;
        For(j,x,m+x-1)res^=j;
    }
    if(res!=0)cout<<"tolik"<<endl;
    else cout<<"bolik"<<endl;

    return 0;

}


#include <iostream>

#include <cstdio>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <algorithm>

#include <cstring>

#include <cmath>

using namespace std;

#define Rep(i,n) for(int i=0;i<(n);++i)

#define For(i,a,b) for(int i=(a);i<=(b);++i)

#define Ford(i,a,b) for(int i=(a);i>=(b);--i)

#define fi first

#define se second

#define pb push_back

#define MP make_pair

typedef pair<int,int> PII;

typedef vector<int> VI;

long long get(long long x){
    long long res = 0;
    Rep(i,62) {
        // i set to 1
        if((x & (1LL<<i))!=0) {
            long long sl = (x >> (i+1)) * (1LL<<i) + (x&((1LL<<i)-1))+1;
            if(sl % 2 != 0) res |= 1LL<<i;
        }
        else {
            long long sl = (x >> (i+1)) * (1LL<<i);
            if(sl % 2 != 0) res |= 1LL << i;
        }
    }
    return res;
}

int main() {
    //cout << get(6) << endl;
    int n;

    scanf("%d",&n);
    long long res = 0;
    Rep(i,n){
        long long m,x;
        scanf("%I64d%I64d",&x,&m);
        // cin>>m>>x;
        // if(x<1||m<1)while(1);
        long long r = get(x-1);
        r = r ^ get(m + x - 1);
        res ^= r;
    }
    if(res!=0) cout << "tolik" << endl;
    else cout << "bolik" << endl;

    return 0;

}


#include <iostream>

#include <cstdio>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <algorithm>

#include <cstring>

#include <cmath>

using namespace std;

#define Rep(i,n) for(int i=0;i<(n);++i)

#define For(i,a,b) for(int i=(a);i<=(b);++i)

#define Ford(i,a,b) for(int i=(a);i>=(b);--i)

#define fi first

#define se second

#define pb push_back

#define MP make_pair

typedef pair<int,int> PII;

typedef vector<int> VI;

long long get(long long x){
    long long res = 0;
    Rep(i,61) {
        // i set to 1
        if((x & (1LL<<i))!=0) {
            long long sl = (x >> (i+1)) * (1LL<<i) + (x&((1LL<<i)-1))+1;
            if(sl % 2 != 0) res |= 1LL<<i;
        }
        else {
            long long sl = (x >> (i+1)) * (1LL<<i);
            if(sl % 2 != 0) res |= 1LL << i;
        }
    }
    return res;
}

int main() {
    //cout << get(6) << endl;
    int n;

    scanf("%d",&n);
    long long res = 0;
    Rep(i,n){
        long long m,x;
        //scanf("%lld%lld",&m,&x);
        cin>>m>>x;
        long long r = get(x-1);
        r = r ^ get(m + x - 1);
        res ^= r;
    }
    if(res!=0) cout << "tolik" << endl;
    else cout << "bolik" << endl;

    return 0;

}


#include <iostream>

#include <cstdio>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <algorithm>

#include <cstring>

#include <cmath>

using namespace std;

#define Rep(i,n) for(int i=0;i<(n);++i)

#define For(i,a,b) for(int i=(a);i<=(b);++i)

#define Ford(i,a,b) for(int i=(a);i>=(b);--i)

#define fi first

#define se second

#define pb push_back

#define MP make_pair

typedef pair<int,int> PII;

typedef vector<int> VI;

long long get(long long x){
	long long res = 0;
	Rep(i,62) {
		// i set to 1
		if((x & (1LL<<i))!=0) {
			long long sl = (x >> (i+1)) * (1LL<<i) + (x&((1LL<<i)-1))+1;
			if(sl % 2 != 0) res |= 1LL<<i;
		}
		else {
			long long sl = (x >> (i+1)) * (1LL<<i);
			if(sl % 2 != 0) res |= 1LL << i;
		}
	}
	return res;
}

int main() {
	//cout << get(6) << endl;
	int n;

	scanf("%d",&n);
	long long res = 0;
	Rep(i,n){
		long long m,x;
		//scanf("%lld%lld",&m,&x);
		cin>>m>>x;
		if(x<1||m<1)while(1);
		long long r = get(x-1);
		r = r ^ get(m + x - 1);
		res ^= r;
	}
	if(res!=0) cout << "tolik" << endl;
	else cout << "bolik" << endl;

	return 0;

}


#include<bits/stdc++.h>
#define MAX 10000
#define pb push_back
#define mp make_pair
#define fi first
#define sc second
#define ellapse printf("Time : %0.3lf\n",clock()*1.0/CLOCKS_PER_SEC);
using namespace std;
/*
//E,SE,S,SW,W,NW,N,NE
int dr[8]={0,1,1,1,0,-1,-1,-1};
int dc[8]={1,1,0,-1,-1,-1,0,1};
*/
typedef long long l64d;
typedef unsigned long int ud;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
l64d compute(l64d u){
    //pattern base on 1 ^ .. ^ n;
    if(u%4 == 1) return 1;
    else if(u%4 == 2) return u + 1;
    else if(u%3 == 3) return 0;
    else if(u%4 == 0) return u;
}
int main()
{
    #ifdef Xanxiver
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    #endif
    //std::ios::sync_with_stdio(false);
    l64d res=0,a,b;
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a>>b;///eg -> a = 3, b = 4 , we need 3 ^ ... ^ 3 + 4 - 1
        ///therefore 1 ^ 1 ^ 2 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6, we xor 1 & 2 twice
        res ^= compute(a-1); /// xor 1 ^ 2 ^ ... ^ (3-1); once
        res ^= compute(a + b - 1); ///xor 1 ^ 2 ^ ... ^ 3 + 4 - 1 ; twice
    }
    cout<<((res)?"tolik":"bolik")<<endl;
    #ifdef Xanxiver
    ellapse;
    #endif // Xanxiver
}


#include<bits/stdc++.h>
#define MAX 10000
#define pb push_back
#define mp make_pair
#define fi first
#define sc second
#define ellapse printf("Time : %0.3lf\n",clock()*1.0/CLOCKS_PER_SEC);
using namespace std;
/*
//E,SE,S,SW,W,NW,N,NE
int dr[8]={0,1,1,1,0,-1,-1,-1};
int dc[8]={1,1,0,-1,-1,-1,0,1};
*/
typedef long long l64d;
typedef unsigned long int ud;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
l64d compute(l64d u){
    //pattern base on 1 ^ .. ^ n;
    if(u%4 == 1) return 1;
    else if(u%4 == 2) return u + 1;
    else if(u%3 == 3) return 0;
    else if(u%4 == 0) return u;
}
int main()
{
    #ifdef Xanxiver
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    #endif
    //std::ios::sync_with_stdio(false);
    l64d res=0L,a,b;
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a>>b;///eg -> a = 3, b = 4 , we need 3 ^ ... ^ 3 + 4 - 1
        ///therefore 1 ^ 1 ^ 2 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6, we xor 1 & 2 twice
        res ^= compute(a-1); /// xor 1 ^ 2 ^ ... ^ (3-1); once
        res ^= compute(a + b - 1); ///xor 1 ^ 2 ^ ... ^ 3 + 4 - 1 ; twice
    }
    if(!res) cout<<"bolik"<<endl;
    else cout<<"tolik"<<endl;
    #ifdef Xanxiver
    ellapse;
    #endif // Xanxiver
}


#include<bits/stdc++.h>
#define MAX 10000
#define pb push_back
#define mp make_pair
#define fi first
#define sc second
#define ellapse printf("Time : %0.3lf\n",clock()*1.0/CLOCKS_PER_SEC);
using namespace std;
/*
//E,SE,S,SW,W,NW,N,NE
int dr[8]={0,1,1,1,0,-1,-1,-1};
int dc[8]={1,1,0,-1,-1,-1,0,1};
*/
typedef long long l64d;
typedef unsigned long int ud;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
l64d compute(int u){
    //pattern base on 1 ^ .. ^ n;
    if(u<1) return 0;
    if(u%4 == 1) return 1;
    else if(u%4 == 2) return u + 1;
    else if(u%3 == 3) return 0;
    else if(u%4 == 0) return u;
}
int main()
{
    #ifdef Xanxiver
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    #endif
    //std::ios::sync_with_stdio(false);
    l64d res=0,a,b;
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a>>b;///eg -> a = 3, b = 4 , we need 3 ^ ... ^ 3 + 4 - 1
        ///therefore 1 ^ 1 ^ 2 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6, we xor 1 & 2 twice
        res ^= compute(a-1); /// xor 1 ^ 2 ^ ... ^ (3-1); once
        res ^= compute(a + b - 1); ///xor 1 ^ 2 ^ ... ^ 3 + 4 - 1 ; twice
    }
    cout<<((res)?"tolik":"bolik")<<endl;
    #ifdef Xanxiver
    ellapse;
    #endif // Xanxiver
}


#include<bits/stdc++.h>
#define MAX 10000
#define pb push_back
#define mp make_pair
#define fi first
#define sc second
#define ellapse printf("Time : %0.3lf\n",clock()*1.0/CLOCKS_PER_SEC);
using namespace std;
/*
//E,SE,S,SW,W,NW,N,NE
int dr[8]={0,1,1,1,0,-1,-1,-1};
int dc[8]={1,1,0,-1,-1,-1,0,1};
*/
typedef long long l64d;
typedef unsigned long int ud;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
l64d compute(l64d u){
    //pattern is based on 1 ^ .. ^ u;
    if(u%4 == 1) return 1;
    else if(u%4 == 2) return u + 1;
    else if(u%4 == 3) return 0;
    else if(u%4 == 0) return u;
}
int main()
{
    #ifdef Xanxiver
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    #endif
    //std::ios::sync_with_stdio(false);
    l64d res=0,a,b;
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a>>b;///eg -> a = 3, b = 4 , we need 3 ^ ... ^ 3 + 4 - 1
        ///therefore 1 ^ 1 ^ 2 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6, we xor 1 & 2 twice
        res ^= compute(a-1); /// xor 1 ^ 2 ^ ... ^ (3-1); once
        res ^= compute(a + b - 1); ///xor 1 ^ 2 ^ ... ^ 3 + 4 - 1 ; twice
    }
    if(!res) cout<<"bolik"<<endl;
    else cout<<"tolik"<<endl;
    #ifdef Xanxiver
    ellapse;
    #endif // Xanxiver
}


#include<bits/stdc++.h>
#define MAX 10000
#define pb push_back
#define mp make_pair
#define fi first
#define sc second
#define ellapse printf("Time : %0.3lf\n",clock()*1.0/CLOCKS_PER_SEC);
using namespace std;
/*
//E,SE,S,SW,W,NW,N,NE
int dr[8]={0,1,1,1,0,-1,-1,-1};
int dc[8]={1,1,0,-1,-1,-1,0,1};
*/
typedef long long l64d;
typedef unsigned long int ud;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
l64d compute(l64d u){
    //pattern base on 1 ^ .. ^ n;
    if(u<1) return 0;
    if(u%4 == 1) return 1;
    else if(u%4 == 2) return u + 1;
    else if(u%3 == 3) return 0;
    else if(u%4 == 0) return u;
}
int main()
{
    #ifdef Xanxiver
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    #endif
    //std::ios::sync_with_stdio(false);
    l64d res=0,a,b;
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a>>b;///eg -> a = 3, b = 4 , we need 3 ^ ... ^ 3 + 4 - 1
        ///therefore 1 ^ 1 ^ 2 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6, we xor 1 & 2 twice
        res ^= compute(a-1); /// xor 1 ^ 2 ^ ... ^ (3-1); once
        res ^= compute(a + b - 1); ///xor 1 ^ 2 ^ ... ^ 3 + 4 - 1 ; twice
    }
    cout<<((res)?"tolik":"bolik")<<endl;
    #ifdef Xanxiver
    ellapse;
    #endif // Xanxiver
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint dp[77][2];

Lint get(Lint xx){
    vi limit;
    Lint x = xx;
    while(x > 0){
        limit.pb(x & 1);
        x >>= 1;
    }
    reverse(all(limit));
    Lint res = 0 ;
    REP(i,63) if(two(i) <= xx){
        int pass = limit.size() - 1 - i ;
        dp[limit.size()][0] = 1;
        dp[limit.size()][1] = 1;
        Ford(j,limit.size() - 1,0){
            dp[j][0] = dp[j][1] = 0 ;
            dp[j][0] += dp[j + 1][0];
            if(j!=pass) dp[j][0] += dp[j + 1][0];
            if(limit[j] == 1){
                if(j!=pass) dp[j][1] += dp[j + 1][0];
                dp[j][1] += dp[j + 1][1];
            }else{
                if(j!=pass) dp[j][1] += dp[j + 1][1];
            }
        }
        if(dp[0][1] & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint dp[77][2];
int limit[77];

Lint get(Lint n){
    Lint res = 0;
    REP(i,63){
        Lint k = two(i + 1);
        if(n % k >= (k >> 1)) res|=two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint dp[77][2];

Lint get(Lint xx){
    vi limit;
    Lint x = xx;
    while(x > 0){
        limit.pb(x & 1);
        x >>= 1;
    }
    reverse(all(limit));
    Lint res = 0 ;
    REP(i,63) if(two(i) <= xx){
        int pass = limit.size() - 1 - i ;
        dp[limit.size() -1][0] = 1;
        dp[limit.size() -1][1] = 1;
        Ford(j,limit.size() - 2,0){
            dp[j][0] = dp[j][1] = 0 ;
            dp[j][0] += dp[j + 1][0];
            if(j!=pass) dp[j][0] += dp[j + 1][0];
            if(limit[j] == 1){
                if(j!=pass) dp[j][1] += dp[j + 1][0];
                dp[j][1] += dp[j + 1][1];
            }else{
                if(j!=pass) dp[j][1] += dp[j + 1][1];
            }
        }
        if(dp[0][1] & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint dp[67][2];
vi limit;
int pass;

Lint f(int pos,int isequal){
    if(pos == limit.size()) return 1LL;
    Lint &rev = dp[pos][isequal];
    if(rev != -1) return rev;
    rev = 0 ;
    int e = isequal? limit[pos] + 1 : 2;
    if(pos == pass){
        if(e == 1) return rev = 0LL;
        else return rev = f(pos + 1,isequal && (limit[pos] == 1));
    }
    REP(i,e){
        rev += f(pos + 1,isequal && (limit[pos]==i));
    }
    return rev;
}

Lint get(Lint xx){
    limit.clear();
    Lint x = xx;
    while(x > 0){
        limit.pb(x & 1);
        x >>= 1;
    }
    reverse(all(limit));
    Lint res = 0 ;
    REP(i,63) if(two(i) <= xx){
        pass = limit.size() - 1 - i ;
        fill(dp,-1);
        Lint cnt = f(0,true);
        dbg(cnt);
        if(cnt & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint get(Lint n){
    Lint res = 0;
    REP(i,63) if(two(i) <= n){
        Lint k = two(i + 1);
        Lint cnt = n / k * two(i);
        if(n % k >= k / 2) cnt += n % k - k / 2 + 1;
        if(cnt & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint get(Lint n){
    Lint res = 0;
    REP(i,63) if(two(i) <= n){
        Lint k = two(i + 1);
        Lint cnt = (n + 1) / k ;
        if(n % k >= k / 2) cnt += n % k - k / 2 + 1;
        if(cnt & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint dp[77][2];
int limit[77];

Lint get(Lint n){
    Lint res = 0;
    REP(i,63) if(two(i) <= n){
        Lint k = two(i + 1);
        Lint cnt = (n + k - 1) / k ;
        if(n % k >= k / 2) cnt += n % k - k / 2;
        if(cnt & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint get(Lint n){
    Lint res = 0;
    REP(i,63) if(two(i) <= n){
        Lint k = two(i + 1);
        Lint cnt = n / k * two(i);
        if(n % k >= k / 2) cnt += n % k - k / 2 + 1;
        if(cnt & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x , m ;
        cin >> x >> m;
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint dp[77][2];
int limit[77];

Lint get(Lint n){
    Lint res = 0;
    REP(i,63) if(two(i) <= n){
        Lint k = two(i + 1);
        Lint cnt = (n + 1) / k ;
        if(n % k >= k / 2) cnt += n % k - k / 2;
        if(cnt & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <queue>
#include <list>
#include <map>
#include <set>

#define For(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FOR(i,a) For(i,1,a)
#define Ford(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define Rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,a) Rep(i,0,a)
#define type(x) __typeof(x.begin())
#define foreach(it,x) for(__typeof(x.begin()) it = x.begin() ; it!=x.end() ; it++ )

#define NEW(x,n) (x*)calloc(n,sizeof(x))
#define fill(x,y) memset(x,y,sizeof x)
#define all(x) x.begin(),x.end()
#define two(x) (1LL<<(x))
#define fi first
#define se second
#define gcd __gcd
#define pb push_back
#define mp make_pair

#ifdef KAZAR
	#define dbg(x) cerr<<#x<<":"<<(x)<<endl
	#define dg(x) cerr<<#x<<":"<<(x)<<' '
#else
	#define dbg(x) 0
	#define dg(x) 0
#endif

using namespace std;

typedef long long Lint;
typedef long double ld;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int inf = 1e9+5143;
const Lint Linf = 1e18+5413;
const double eps = 1e-10;
const double pi = acos(-1);

template<class T> inline void umax(T &a,T b){if(a<b) a = b ; }
template<class T> inline void umin(T &a,T b){if(a>b) a = b ; }
template<class T> inline T abs(T a){return a>0 ? a : -a;}
template<class T> inline T lcm(T a,T b){
	return a/gcd(a,b)*b;
}

inline int read(){
	int res = 0LL ;int neg ;
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9' || ch=='-'){
			if(ch=='-') neg = -1;
			else neg = 1 , res = ch-'0';
			break;
		}
	}
	while(1){
		char ch = getchar();
		if(ch>='0' && ch<='9') res*=10 , res+=ch-'0';
		else break;
	}
	return res*neg;
}

Lint get(Lint n){
    Lint res = 0;
    REP(i,63) if(two(i) <= n){
        Lint k = two(i + 1);
        Lint cnt = (n + 1) / k * two(i);
        if(n % k >= k / 2) cnt += n % k - k / 2 + 1;
        if(cnt & 1) res |= two(i);
    }
    return res;
}

int main(){

#ifdef KAZAR
	freopen("f.input","r",stdin);
	freopen("f.output","w",stdout);
	freopen("error","w",stderr);
#endif

    int n = read();
    Lint res = 0 ;

    FOR(i,n){
        Lint x = read();
        Lint m = read();
        res ^= get(x + m - 1) ^ get(x - 1);
    }

    if(res > 0) puts("tolik");
    else puts("bolik");

	return 0;
}


#include<iostream>
using namespace std;

long long ans( int i )
{
  if( i == 0 )
    return 0;
  if( i % 4 == 1 )
    return 1;
  if( i % 4 == 2 )
    return (i+1);
  if( i % 4 == 3 )
    return 0;

  return i;
}

int main()
{
 int n;
 long long x = 0;
 cin>>n;
 for(int i = 1; i<= n ; i ++)
 {
   long long a , b;
   cin>>a>>b;
   x ^= ans( a + b - 1 );
   x ^= ans( b - 1 );
 }
 if( x == 0 )
   cout<<"bolik"<<endl;
 else
   cout<<"tolik"<<endl;

 return 0;
}


#include<iostream>
#include<cassert>
using namespace std;

long long ans( long long i )
{
  if( i == 0 )
    return 0;
  long long y = ( ( i % 4 ) + 4 ) % 4  ;
  assert( y >= 0 );
  if( y == 1 )
    return 1;
  if( y == 2 )
    return (i+1);
  if( y == 3 )
    return 0;

  return i;
}

int main()
{
 int n;
 long long x = 0;
 cin>>n;
 for(int i = 1; i<= n ; i++)
 {
   long long a , b;
   cin>>a>>b;
   x ^= ans( a + b - 1 );
   x ^= ans( b - 1 );
 }
 if( x == 0 )
   cout<<"bolik"<<endl;
 else
   cout<<"tolik"<<endl;

 return 0;
}


#include<iostream>
#include<cassert>
using namespace std;

long long ans( int i )
{
  if( i == 0 )
    return 0;
  long long y = ( i % 4 );
  if( y < 4 )
    y+=4;
  assert( y >= 0 );
  if( y == 1 )
    return 1;
  if( y == 2 )
    return (i+1);
  if( y  == 3 )
    return 0;

  return i;
}

int main()
{
 int n;
 long long x = 0;
 cin>>n;
 for(int i = 1; i<= n ; i++)
 {
   long long a , b;
   cin>>a>>b;
   x ^= ans( a + b - 1 );
   x ^= ans( b - 1 );
 }
 if( x == 0 )
   cout<<"bolik"<<endl;
 else
   cout<<"tolik"<<endl;

 return 0;
}


#include<iostream>
#include<cassert>
using namespace std;

long long ans( int i )
{
  if( i == 0 )
    return 0;
  long long y = ( ( i % 4 ) + 4 ) % 4  ;
  assert( y >= 0 );
  if( y == 1 )
    return 1;
  if( y == 2 )
    return (i+1);
  if( y == 3 )
    return 0;

  return i;
}

int main()
{
 int n;
 long long x = 0;
 cin>>n;
 for(int i = 1; i<= n ; i++)
 {
   long long a , b;
   cin>>a>>b;
   x ^= ans( a + b - 1 );
   x ^= ans( b - 1 );
 }
 if( x == 0 )
   cout<<"bolik"<<endl;
 else
   cout<<"tolik"<<endl;

 return 0;
}


#include<iostream>
#include<cassert>
using namespace std;

long long ans( long long i )
{
  if( i == 0 )
    return 0;
  long long y = ( ( i % 4 ) + 4 ) % 4  ;
  assert( y >= 0 );
  if( y == 1 )
    return 1;
  if( y == 2 )
    return (i+1);
  if( y == 3 )
    return 0;

  return i;
}

int main()
{
 int n;
 long long x = 0;
 cin>>n;
 for(int i = 1; i<= n ; i++)
 {
   long long a , b;
   cin>>a>>b;
   x ^= ans( a + b - 1 );
   x ^= ans( a - 1 );
 }
 if( x == 0 )
   cout<<"bolik"<<endl;
 else
   cout<<"tolik"<<endl;

 return 0;
}


#include<iostream>
using namespace std;

long long ans( int i )
{
  if( i == 0 )
    return 0;
  if( i % 4 == 1 )
    return 1;
  if( i % 4 == 2 )
    return (i+1);
  if( i % 4 == 3 )
    return 0;

  return i;
}

int main()
{
 int n;
 long long x = 0;
 cin>>n;
 for(int i = 1; i<= n ; i ++)
 {
   long long a , b;
   cin>>a>>b;
   x ^= ans( a + b - 1 );
   x ^= ans( a - 1 );
 }
 if( x == 0 )
   cout<<"bolik"<<endl;
 else
   cout<<"tolik"<<endl;

 return 0;
}


#include<stdio.h>
#include<iostream>
using namespace std;

long long x, ans;
int n, m;

long long bit_xx(long long a){
    if(a == 0) return 0;
    if(a==1) return 1;
    if(a==2) return 3;
    if(a==3) return 0;
    int k = 63 - __builtin_clzll(a);
    long long tot = (1 - a % 2) * (1ll << k);
    tot ^= bit_xx(a - (1ll << k));
    return tot;
}

int main(){
    ans = 0;
    cin >> n;
    for(int i = 0; i < n; i ++){
        cin >> x >> m;
        ans ^= bit_xx( x + m - 1);
        ans ^= bit_xx( x - 1);
    }
    if(ans > 0) puts("tolik");
    else puts("bolik");
}


#include<cstdio>
#include<cmath>

long long x, ans;
int n, m;

long long bit_xx(long long a){
    if(a == 0) return 0;
    int k = log2(a);
    if(k > 1){
        long long tot = (1 - a % 2) * 1ll << k;
        tot ^= bit_xx(a - 1ll << k);
        return tot;
    }
    if(a==1) return 1;
    if(a==2) return 3;
    return 0;
}

int main(){
    scanf("%d", &n);
    for(int i = 0; i < n; i ++){
        scanf("%I64d %I64d", &x, &m);
        ans ^= bit_xx( x + m - 1);
        ans ^= bit_xx( x - 1);
    }
    if(ans) puts("tolik");
    else puts("bolik");

}


#include<stdio.h>
#include<math.h>
#include<iostream>
using namespace std;

long long x, ans;
int n, m;

long long bit_xx(long long a){
    if(a == 0) return 0;
    if(a==1) return 1;
    if(a==2) return 3;
    if(a==3) return 0;
    int k = 63 - __builtin_clzll(a);
    long long tot = (1 - a % 2) * (1ll << k);
    tot ^= bit_xx(a - (1ll << k));
    return tot;
}

int main(){
    //freopen("c.in", "r", stdin);
    cin >> n;
    for(int i = 0; i < n; i ++){
        cin >> x >> m;
        ans ^= bit_xx( x + m - 1);
        ans ^= bit_xx( x - 1);
    }
    if(ans > 0) puts("tolik");
    else puts("bolik");
}