stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <vector>

#include <utility>



typedef long long ll;

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

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

#define ALL(a) (a).begin(), (a).end()

using namespace std;



vector<pair<int, int>> G[100001];

int dist[100001];

bool used[100001];



bool dfs(int x, int d) {

    if (used[x]) return d == dist[x];



    dist[x] = d;

    used[x] = true;

    for (auto p : G[x]) {

        if (!dfs(p.first, d + p.second))

            return false;

    }

    return true;

}



int main() {

    int N, M, L, R, D;

    cin >> N >> M;

    REP(i, M) {

        cin >> L >> R >> D;

        G[L].push_back({R, D});

        G[R].push_back({L, -D});

    }



    FOR(i, 1, N + 1) {

        if (!used[i] && !dfs(i, 0)) {

            cout << "No" << endl;

            return 0;

        }

    }



    cout << "Yes" << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.5056438178931626x):
#include <iostream>

#include <algorithm>

#include <utility>

#include <vector>

#include <string>



using namespace std;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

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

#define RREP(i, n) for (int i = (n) - 1; i >= 0; i--)

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

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

#define ALL(a) (a).begin(), (a).end()



class UnionFind {

private:

    int n;

    vector<pii> par;

public:

    UnionFind(int n) : n(n), par(n, {-1, 0}) {}



    pii root(int x) {

        if (par[x].first < 0) return {x, par[x].second};



        pii pp = par[x];

        pii rp = root(par[x].first);

        return par[x] = {rp.first, pp.second + rp.second};

    }



    bool same(int x, int y) { return root(x).first == root(y).first; }



    bool unite(int l, int r, int d) {

        pii lp = root(l), rp = root(r);

        if (lp.first != rp.first) {

            par[lp.first] = {par[lp.first].first + par[rp.first].first, 0};

            par[rp.first] = {lp.first, d + lp.second - rp.second};

        }

        else {

            return rp.second - lp.second == d;

        }

        return true;

    }



    int set_size(int x) { return -par[root(x).first].first; }



    int size() const { return n; }

};



int main() {

    int N, M, L, R, D;

    cin >> N >> M;



    UnionFind uf(N);

    bool ok = true;

    REP(i, M) {

        cin >> L >> R >> D;

        ok &= uf.unite(L - 1, R - 1, D);

    }



    if (ok) cout << "Yes" << endl;

    else    cout << "No" << endl;

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



inline void Boost() {

	ios::sync_with_stdio(false);

	cin.tie(NULL); cout.tie(NULL);

}

typedef long long int ll;

typedef long double ld;



const int NMax = 1e5 + 50;

const int LIM = 1e9;



struct op {

	int l, r, d;

};



int in[NMax];

int pos[NMax];

op v[2 * NMax];

vector < pair < int, int > > G[NMax];

vector < pair < int, int > > revG[NMax];



void SolveG(int node);

void SolveRev(int node);



void SolveG(int node) {

	for(auto it: G[node]) {

		if(pos[it.first] == -1) {

			pos[it.first] = pos[node] + it.second;

			SolveRev(it.first); 

			SolveG(it.first);

		}

	}

}

void SolveRev(int node) {

	for(auto it: revG[node]) {

		if(pos[it.first] == -1) {

			pos[it.first] = pos[node] + it.second;

			SolveG(it.first); 

			SolveRev(it.first);

		}

	}

}



int main() {

	Boost();



	int n, m;

	cin >> n >> m;



	for(int i = 1; i <= n; ++i) pos[i] = -1;



	for(int i = 1; i <= m; ++i) {

		cin >> v[i].l >> v[i].r >> v[i].d;

		G[v[i].l].push_back({v[i].r, v[i].d});

		revG[v[i].r].push_back({v[i].l, -v[i].d});

		in[v[i].r]++;

	}



	for(int i = 1; i <= n; ++i) {

		if(in[i] == 0 && pos[i] == -1) {

			if(pos[i] == -1) pos[i] = LIM;

			SolveG(i);

		}

	}



	// for(int i = 1; i <= n; ++i) cout << pos[i] << " ";

	// cout << endl;



	for(int i = 1; i <= m; ++i) {

		if(pos[v[i].r] - pos[v[i].l] != v[i].d) {

			cout << "No";

			exit(0);

		}

	}



	cout << "Yes";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.803632215135975x):
#include <bits/stdc++.h>



using namespace std;



inline void Boost() {

	ios::sync_with_stdio(false);

	cin.tie(NULL); cout.tie(NULL);

}

typedef long long int ll;

typedef long double ld;



const int NMax = 1e5 + 50;

const int LIM = 1e9;



struct op {

	int l, r, d;

};



int pos[NMax];

op v[2 * NMax];

vector < pair < int, int > > G[NMax];



int main() {

	Boost();



	int n, m;

	cin >> n >> m;



	for(int i = 1; i <= n; ++i) pos[i] = -1;



	for(int i = 1; i <= m; ++i) {

		cin >> v[i].l >> v[i].r >> v[i].d;

		G[v[i].l].push_back({v[i].r, v[i].d});

		G[v[i].r].push_back({v[i].l, -v[i].d});

	}



	for(int i = 1; i <= n; ++i) {

		if(pos[i] != -1) continue;

		queue < int > Q;

		Q.push(i);



		while(!Q.empty()) {

			int node = Q.front(); Q.pop();

			if(pos[node] == -1) pos[node] = LIM;



			for(auto it: G[node]) {

				if(pos[it.first] == -1) {

					pos[it.first] = pos[node] + it.second;

					Q.push(it.first);

				}

			}

		}

	}



	// for(int i = 1; i <= n; ++i) cout << pos[i] << " ";

	// cout << endl;



	for(int i = 1; i <= m; ++i) {

		if(pos[v[i].r] - pos[v[i].l] != v[i].d) {

			cout << "No";

			exit(0);

		}

	}



	cout << "Yes";

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define LL long long

#define mp make_pair

#define pb push_back

#define INF (1<<29)

using namespace std;

typedef pair<int,int>pii;

int n,m;

vector<pii>G[200010];

int col[200010];

int vis[200010];

bool dfs(int x,int co){

//	cout<<"In:"<<x<<' '<<co<<endl;

	if(vis[x]!=-1)return col[x]==co;

	vis[x]=1;

	col[x]=co;

	for(pii i:G[x]){

		if(dfs(i.first,co+i.second)==0)return false;

//		else{

//			if(vis[i.first]!=co+i.second)return false;

//		}

	}

	return true;

}

int main(){

//	freopen("produce/People.txt","r",stdin);

	cin>>n>>m;

	memset(vis,-1,sizeof(vis));

	if(m==0){

		cout<<"Yes\n";

		return 0;

	}

	for(int i=1;i<=m;i++){

		int l,r,d;

		cin>>l>>r>>d;

		G[l].pb(mp(r,d));

		G[r].pb(mp(l,-d));

	}

	for(int i=1;i<=n;i++){

		if(vis[i]!=-1)continue;

		memset(col,0,sizeof(col));

		if(dfs(i,0)==0){

			cout<<"No\n";

			return 0;

		}

//		cout<<"-----------------------\n";

	}

	cout<<"Yes\n";

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 7.742045448256164x):
#include <iostream>

#include <string>

#include <cstdio>

#include <cmath>

#include <cstring>

#define max(x,y) x > y? x: y

using namespace std;



const int maxn = 1011111;

int father[maxn];

int gradfa[maxn];



int find(int x)

{

    if(father[x] == x)

        return x;



    int r = find(father[x]);

    gradfa[x] = gradfa[father[x]] + gradfa[x];



    return father[x] = r;

}



int fix(int x,int y,int z)

{

    int fx = find(x);

    int fy = find(y);

    if(fx ==  fy)

        return z == gradfa[y] - gradfa[x];

    father[fy] = fx;

    gradfa[fy] = gradfa[x] + z - gradfa[y];

    return 1;

}



int main()

{

    int n, m;

    int lose = 1;

    cin >> n >> m;

    for(int i = 1; i <= n; i++)

        father[i] = i;

    for(int i = 1; i <= m; i++)

    {

        int x, y, z;

        cin >> x >> y >> z;



        if(lose)

            lose = fix(x, y, z);

    }



    if(lose)

        cout << "Yes" << endl;

    else

        cout << "No" << endl;

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <queue>

#include <set>

#include <vector>

using namespace std;



int N;

int M;



int L[200010];

int R[200010];

int D[200010];



typedef pair<int,int> P;



vector<P> edges[100010];

set<int> st;



int dist[100010];

int visited[100010];



int main()

{

	fill(dist,dist + 100010,-1e9);



	cin >> N >> M;



	for(int i = 1;i <= M;i++)

	{

		cin >> L[i] >> R[i] >> D[i];

		edges[L[i]].push_back({R[i],D[i]});

		edges[R[i]].push_back({L[i],-D[i]});

		st.insert(L[i]);

		st.insert(R[i]);

	}



	int s = -1;



	while(!st.empty())

	{

		auto ite = st.begin();

	

		{

			s = *ite;



			queue<P> que;

			que.push({s,0});

			dist[s] = 0;



			while(!que.empty())

			{

				int v = que.front().first;

				int d = que.front().second;

				que.pop();



				st.erase(v);

				for(P& p : edges[v]) {

					if(dist[p.first] == -1e9){

						dist[p.first] = d + p.second;

						que.push(P(p.first,d + p.second));

					}

					else if(dist[p.first] != d + p.second)

					{

						cout << "No" << endl;

						return 0;

					}



				}

				

			}

			

		}

	}



	cout << "Yes" << endl;

	return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.911714572649873x):
#include <vector>

using namespace std;

using i64 = long long;



struct WeightedUnionFind

{

	vector<int> par;

	vector<i64> ws;



	WeightedUnionFind(int n) : par(n,0) , ws(n,0)

	{

		for(int i = 0;i < n;i++)

		{

			par[i] = -1;

		}

	}



	int find(int x)

	{

		if(par[x] < 0)

		{

			return x;

		}

		else

		{

			const int parent = find(par[x]);

			ws[x] += ws[par[x]];

			return par[x] = parent;

		}

	}



	int weight(int x)

	{

		find(x);

		return ws[x];

	}



	bool unite(int x,int y,int w) //x + w = y

	{

		w += weight(x);

		w -= weight(y);

		x = find(x);

		y = find(y);



		if(x != y)

		{

			if(par[y] < par[x])

			{

				swap(x,y);

				w = -w;

			}

			par[x] += par[y];

			par[y] = x;

			ws[y] = w;

			return true;

		}

		else

		{

			return false;

		}

	}



	bool same(int x,int y)

	{

		return find(x) == find(y);

	}



	pair<bool,int>  diff(int x,int y)

	{

		if(!same(x,y)) return {false,0};

		return {true,weight(x) - weight(y)};

	}

};



#include <iostream>



int n;

int m;



int main()

{

	cin >> n >> m;

	WeightedUnionFind uf(n + 1);

	for(int i = 0;i < m;i++)

	{

		i64 x,y,w;

		cin >> x >> y >> w;

		

		auto p = uf.diff(x,y);

		if(!p.first)

		{

			uf.unite(x,y,-w);

		}

		else if(p.second != w)

		{

			cout << "No" << endl;

			return 0;

		}

	}

	cout << "Yes" << endl;

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <queue>

#include <set>

#include <vector>

using namespace std;



int N;

int M;



int L[200010];

int R[200010];

int D[200010];



typedef pair<int,int> P;



vector<P> edges[100010];

set<int> st;



int dist[100010];

int visited[100010];



int main()

{

	fill(dist,dist + 100010,-1e9);



	cin >> N >> M;



	for(int i = 1;i <= M;i++)

	{

		cin >> L[i] >> R[i] >> D[i];

		edges[L[i]].push_back({R[i],D[i]});

		edges[R[i]].push_back({L[i],-D[i]});

		st.insert(L[i]);

		st.insert(R[i]);

	}



	int s = -1;



	while(!st.empty())

	{

		auto ite = st.begin();

	

		{

			s = *ite;



			queue<P> que;

			que.push({s,0});

			dist[s] = 0;



			while(!que.empty())

			{

				int v = que.front().first;

				int d = que.front().second;

				que.pop();



				st.erase(v);

				for(P& p : edges[v]) {

					if(dist[p.first] == -1e9){

						dist[p.first] = d + p.second;

						que.push(P(p.first,d + p.second));

					}

					else if(dist[p.first] != d + p.second)

					{

						cout << "No" << endl;

						return 0;

					}



				}

				

			}

			

		}

	}



	cout << "Yes" << endl;

	return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.91596969930934x):
#include <bits/stdc++.h>

using namespace std;

using i64 = long long;

#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)



#include <vector>

using namespace std;

using i64 = long long;



struct WeightedUnionFind {

  vector<int> par;

  vector<i64> ws;



  WeightedUnionFind(int n) : par(n, 0), ws(n, 0) {

    for (int i = 0; i < n; i++) {

      par[i] = -1;

    }

  }



  int find(int x) {

    if (par[x] < 0) {

      return x;

    } else {

      const int parent = find(par[x]);

      ws[x] += ws[par[x]];

      return par[x] = parent;

    }

  }



  int weight(int x) {

    find(x);

    return ws[x];

  }



  bool unite(int x, int y, int w)  // x + w = y

  {

    w += weight(x);

    w -= weight(y);

    x = find(x);

    y = find(y);



    if (x != y) {

      if (par[y] < par[x]) {

        swap(x, y);

        w = -w;

      }

      par[x] += par[y];

      par[y] = x;

      ws[y] = w;

      return true;

    } else {

      return false;

    }

  }



  bool same(int x, int y) { return find(x) == find(y); }



  pair<bool, int> diff(int x, int y) {

    if (!same(x, y)) return {false, 0};

    return {true, weight(x) - weight(y)};

  }

};



int N;

int M;



int main(){

  cin >> N;

  cin >> M;



  WeightedUnionFind uf(N);

  

  rep(i,0,M - 1){

    int l,r,d;

    cin >> l >> r >> d;

    l--;

    r--;

    auto p = uf.diff(r,l);

    if(!p.first){

      uf.unite(l,r,d);

    }

    else if(p.second != d){

      cout << "No" << endl;

      return 0;

    }

  }



  cout << "Yes" << endl;

}
// Slower C++ solution:
#include<cstdio>

#include<cstring>

#include<algorithm>

#include<vector>

#include<iostream>



using namespace std;



#define   M             100005

#define   ll            long long

#define   PI            atan(1.0)*4

#define   mst(x,v)      memset(x,v,sizeof(x))

#define   inf           1e9

#define   rush()        int T;scanf("%d",&T);while(T--)



typedef   pair<int,int> P;



vector< P > E[M];

P temp;

int d[M],n,m,l,r,dis;

bool  vis[M],f;



bool dfs(int now,int bef) {

	vis[now]=1;

	if(f) return false;

	

	for(int i=0;i<E[now].size();i++) {

		temp=E[now][i];

		

		if(!vis[temp.first]) {

			d[temp.first]=d[now]+temp.second;

			dfs(temp.first,now);

		}

		else {

			if(d[temp.first] != d[now] + temp.second) {

				f=1;

				return false;

			}

		}

	}

	return true;

}





int main() {



	scanf("%d %d",&n,&m);

	

	while(m--) {

		scanf("%d %d %d",&l,&r,&dis);

		E[l].push_back(make_pair(r,dis));

		E[r].push_back(make_pair(l,-dis));

	}

	

	f=0;

	for(int i=1;i<=n;i++) {

		if(!vis[i]) {

			if(!dfs(i,-1)) {

				f=1;

				break;

			}

		}

	}

	

	puts(f?"No":"Yes");

}




// Faster C++ solution for the same problem (measured speedup: 3.571609851141303x):
#include<bits/stdc++.h>

using namespace std;



#define   M             100005

#define   ll            long long

#define   PI            atan(1.0)*4

#define   mst(x,v)      memset(x,v,sizeof(x))

#define   inf           1e9

#define   rush()        int T;scanf("%d",&T);while(T--)



typedef   pair<int,int> P;



int n,m,l,r,dis,flag;

int f[M],d[M];



int ff(int x) {

	if (f[x] == x) return x;

	int a=f[x];

	int b=ff(a);

	

	d[x]+=d[a];

	f[x]=b;

	

	return b;

}





//          bi - ai = dis              a 接在 b下面 

int mix(int a,int b,int dis) {

	int fa=ff(a);

	int fb=ff(b);

	

	if(fa==fb)

		return d[b]-d[a]==dis;

	

	f[fb]=fa; // fb 的父亲变成了 fa

	d[fb]=d[a] - d[b] + dis;

	

	return 1;

}







int main() {



	scanf("%d %d",&n,&m);

	flag=0;

	

	for(int i=0;i<=n;i++) f[i]=i; 

	

	while(m--) {

		scanf("%d %d %d",&l,&r,&dis);

		if(!mix(l,r,dis))

			flag=1;

	}

	

	puts(flag?"No":"Yes");

}
// Slower C++ solution:
/*

   给出  n 个人 ， m 句话

   

   每句话说 ：给你 l , r , dis 表示 l 在 r 左边的 dis 个距离单位

   

   （里面有假话，有真话）

    

   问 ： 是否上面都是真话

   

 ----------------------------------------------------------------------  

   题解：   

      假设 n 个人 为 n 个点， 然后距离看做 权值，

	  

	  作为一个单向图进行dfs 判断

	  

	  

	  从 1 到 N 每个点进行判断 

	  

	  如果某个值没被访问 ， 以这个点进行 一次深搜，判断是否冲突

	  

	  dfs内容 : 进行标记 访问过 表示已经存在了距离，然后看 能通往这个地方的一些人 （节点）

	  

	  如果这个点被访问过那么通往他的值都会被确定 只要验证

	  

	  如果这个点没被访问，就奖通完他的地方的值进行赋值 ，继续搜索能通往这个没被访问过的节点， 

	  

*/





#include<cstdio>

#include<cstring>

#include<algorithm>

#include<vector>

#include<iostream>



using namespace std;



#define   M             100005

#define   ll            long long

#define   PI            atan(1.0)*4

#define   mst(x,v)      memset(x,v,sizeof(x))

#define   inf           1e9

#define   rush()        int T;scanf("%d",&T);while(T--)



typedef   pair<int,int> P;



vector< P > E[M];

P temp;

int d[M],n,m,l,r,dis;

bool  vis[M],f;



bool dfs(int now) {

	vis[now]=1;

	if(f) return false;

	

	for(int i=0;i<E[now].size();i++) {

		temp=E[now][i];

		

		if(!vis[temp.first]) {

			d[temp.first]=d[now]+temp.second;

			dfs(temp.first);

		}

		else {

			if(d[temp.first] != d[now] + temp.second) {

				f=1;

				return false;

			}

		}

	}

	return true;

}





int main() {



	scanf("%d %d",&n,&m);

	

	while(m--) {

		scanf("%d %d %d",&l,&r,&dis);

		E[l].push_back(make_pair(r,dis));

		E[r].push_back(make_pair(l,-dis));

	}

	

	f=0;

	for(int i=1;i<=n;i++) {

		if(!vis[i]) {

			if(!dfs(i)) {

				f=1;

				break;

			}

		}

	}

	

	puts(f?"No":"Yes");

}




// Faster C++ solution for the same problem (measured speedup: 3.5716728292171895x):
#include<bits/stdc++.h>

using namespace std;



#define   M             100005

#define   ll            long long

#define   PI            atan(1.0)*4

#define   mst(x,v)      memset(x,v,sizeof(x))

#define   inf           1e9

#define   rush()        int T;scanf("%d",&T);while(T--)



typedef   pair<int,int> P;



int n,m,l,r,dis,flag;

int f[M],d[M];



int ff(int x) {

	if (f[x] == x) return x;

	int a=f[x];

	int b=ff(a);

	

	d[x]+=d[a];

	f[x]=b;

	

	return b;

}





//          bi - ai = dis              a 接在 b下面 

int mix(int a,int b,int dis) {

	int fa=ff(a);

	int fb=ff(b);

	

	if(fa==fb)

		return d[b]-d[a]==dis;

	

	f[fb]=fa; // fb 的父亲变成了 fa

	d[fb]=d[a] - d[b] + dis;

	

	return 1;

}







int main() {



	scanf("%d %d",&n,&m);

	flag=0;

	

	for(int i=0;i<=n;i++) f[i]=i; 

	

	while(m--) {

		scanf("%d %d %d",&l,&r,&dis);

		if(!mix(l,r,dis))

			flag=1;

	}

	

	puts(flag?"No":"Yes");

}
// Slower C++ solution:
#include <algorithm>

#include <cstdio>

#include <iostream>

#include <cfloat>

#include <climits>

#include <cstdlib>

#include <cstring>

#include <cmath>

#include <queue>

#include <sstream>

#include <stack>

#include <time.h>

#include <vector>

#include <complex>

#include <map>

#include <set>

#include <iomanip>

#include <math.h>

#include <stdlib.h>

#include <list>

#include <utility>

#include <memory>

#include <cstring>

#include <fstream>

#include <numeric>

#include <assert.h>

#include <bits/stdc++.h>

using namespace std;

#define f first

#define s second 

const int INF=1<<29;

typedef pair<int,int> pii;

int N,M;

int a[200004];

bool vis[200004];

vector <pii> g[200004];

int maxn,minn;

void dfs(int x){

	minn=min(a[x],minn);

	maxn=max(a[x],maxn);

	for (int i=0;i<g[x].size();i++){

		int n=g[x][i].f;

		if (vis[n]){

			if (a[n]!=a[x]+g[x][i].s){

				puts("No");

				exit(0);

			}

		}

		else{

			vis[n]=1;

			a[n]=a[x]+g[x][i].s;

			dfs(n);

		}

	}

}

int main(){

	cin>>N>>M;

	for (int i=0;i<M;i++){

		int x,y,d;

		cin>>x>>y>>d;

		g[x].push_back(pii(y,d));

		g[y].push_back(pii(x,-d));  

	}

	for (int i=1;i<=N;i++){

		if (vis[i]) continue;

		maxn=-INF,minn=INF;

		vis[i]=1;

		a[i]=0;

		dfs(i);

		if (maxn-minn<=1e9);

		else{

			puts("No");

			return 0;

		}

	}

	puts("Yes");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 6.555912615829467x):
#include <bits/stdc++.h>

using namespace std;

int n,m;

int f[100004],h[100004];

int F(int x){

	if(f[x]==x)return x;

	int pa=F(f[x]);

	h[x]+=h[f[x]],f[x]=pa;

	return f[x];

}

int main(){

	scanf("%d%d",&n,&m);

	for(int i=1;i<=n;i++)f[i]=i;

	for(int i=1;i<=m;i++){

		int L,R,D;scanf("%d%d%d",&L,&R,&D);

		int l=F(L),r=F(R);

		if(l==r){

			if(h[R]-h[L]!=D){

				puts("No");

				return 0;

			}

		}else{

			f[r]=l;

			h[r]=D+h[L]-h[R];

		}

	}

	puts("Yes");

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main(){



 int a,b,c;

    cin>>a>>b>>c;

    if(a+b+c < 22){

    cout<<"win\n";}



    else if(a+b+c >= 22){

    cout<<"bust\n";}





}




// Faster C++ solution for the same problem (measured speedup: 5.294742346339484x):
#include<stdio.h>

	int main(){

		int A1,A2,A3,hasil;

		scanf ("%d", &A1);

		getchar();

		scanf ("%d", &A2);

		getchar();

		scanf ("%d", &A3);

		getchar();

		

		if (A1+A2+A3 >= 22){

			hasil = A1+A2+A3;

			printf ("bust\n");

		}else {

			hasil = A1+A2+A3;

		    printf ("win\n");   

	    }

	}
// Slower C++ solution:
#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

          long long int a,b,c;

          cin>>a>>b>>c;

          if((a+b+c)>=22)

          {

                    cout<<"bust\n";

          }

          else

                    cout<<"win\n";

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.292649053685562x):
#include<stdio.h>

	int main(){

		int A1,A2,A3,hasil;

		scanf ("%d", &A1);

		getchar();

		scanf ("%d", &A2);

		getchar();

		scanf ("%d", &A3);

		getchar();

		

		if (A1+A2+A3 >= 22){

			hasil = A1+A2+A3;

			printf ("bust\n");

		}else {

			hasil = A1+A2+A3;

		    printf ("win\n");   

	    }

	}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main(){



 int a,b,c;

    cin>>a>>b>>c;

    if(a+b+c < 22){

    cout<<"win\n";}



    else if(a+b+c >= 22){

    cout<<"bust\n";}





}




// Faster C++ solution for the same problem (measured speedup: 5.294318259255053x):
#include <stdio.h>

int main ()

{

	int A1=1-13,A2=1-13,A3=1-13;

	scanf("%d", &A1);

	scanf("%d", &A2);

	scanf("%d", &A3);

	

	if(A1+A2+A3<22){

		printf("win");

	}else if(A1+A2+A3>=22){

		printf("bust");

	}

	return 0;

	

}
// Slower C++ solution:
#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

          long long int a,b,c;

          cin>>a>>b>>c;

          if((a+b+c)>=22)

          {

                    cout<<"bust\n";

          }

          else

                    cout<<"win\n";

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.292225134265261x):
#include <stdio.h>

int main ()

{

	int A1=1-13,A2=1-13,A3=1-13;

	scanf("%d", &A1);

	scanf("%d", &A2);

	scanf("%d", &A3);

	

	if(A1+A2+A3<22){

		printf("win");

	}else if(A1+A2+A3>=22){

		printf("bust");

	}

	return 0;

	

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main(){



 int a,b,c;

    cin>>a>>b>>c;

    if(a+b+c < 22){

    cout<<"win\n";}



    else if(a+b+c >= 22){

    cout<<"bust\n";}





}




// Faster C++ solution for the same problem (measured speedup: 5.297765040026361x):
#include<stdio.h>



int main()

{

	int A1,A2,A3;

	

	scanf("%d %d %d",&A1,&A2,&A3);

	

	if(A1+A2+A3<22){

		printf("win");

	}

	else{

		printf("bust");

	}

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

          long long int a,b,c;

          cin>>a>>b>>c;

          if((a+b+c)>=22)

          {

                    cout<<"bust\n";

          }

          else

                    cout<<"win\n";

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.295670552341202x):
#include<stdio.h>



int main()

{

	int A1,A2,A3;

	

	scanf("%d %d %d",&A1,&A2,&A3);

	

	if(A1+A2+A3<22){

		printf("win");

	}

	else{

		printf("bust");

	}

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main(){



 int a,b,c;

    cin>>a>>b>>c;

    if(a+b+c < 22){

    cout<<"win\n";}



    else if(a+b+c >= 22){

    cout<<"bust\n";}





}




// Faster C++ solution for the same problem (measured speedup: 5.297765040026361x):
#include<stdio.h>



int main (){

	int num1, num2, num3;

	num1, num2, num3>=1;

	num1, num2, num3<=13;

	

	

	scanf ("%d %d %d", &num1, &num2, &num3);

	if (num1+num2+num3<=21){

		printf("win");

		

	}else {

		printf ("bust");

	    }

	

	return 0;

}