stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <iostream>

#include <vector>

using namespace std;

constexpr long long MOD = 998244353;



int main() {

	int n, s; cin >> n >> s;

	vector<int> a(n);

	for (int i = 0; i < n; ++i) cin >> a[i];



	vector<vector<long long>> dp(3, vector<long long>(s + 3003));

	dp[0][0] = 1;

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

		vector<vector<long long>> next(3, vector<long long>(s + 3003));

		for (int j = 0; j <= s; ++j) {

			(next[0][j] += dp[0][j]) %= MOD;

			(next[1][j] += dp[0][j] + dp[1][j]) %= MOD;

			(next[1][j + a[i]] += dp[0][j] + dp[1][j]) %= MOD;

			(next[2][j] += dp[0][j] + dp[1][j] + dp[2][j]) %= MOD;

			(next[2][j + a[i]] += dp[0][j] + dp[1][j]) %= MOD;

		}

		dp = next;

	}

	cout << dp[2][s];

	return 0;

}

// Optimized solution to the same problem (faster):
#include <iostream>

#include <vector>

using namespace std;

constexpr int MOD = 998244353;



int main() {

	int n, s;

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

	vector<int> a(n);

	for (int i = 0; i < n; ++i) scanf("%d", &a[i]);



	vector<vector<int>> dp(3, vector<int>(s + 1));

	dp[0][0] = 1;

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

		vector<vector<int>> next(3, vector<int>(s + 1));

		for (int j = 0; j <= s; ++j) {

			(next[0][j] += dp[0][j]) %= MOD;

			(next[1][j] += (dp[0][j] + dp[1][j]) % MOD) %= MOD;

			(next[2][j] += ((dp[0][j] + dp[1][j]) % MOD + dp[2][j]) % MOD) %= MOD;

			if (j + a[i] <= s) {

				(next[1][j + a[i]] += (dp[0][j] + dp[1][j]) % MOD) %= MOD;

				(next[2][j + a[i]] += (dp[0][j] + dp[1][j]) % MOD) %= MOD;

			}

		}

		dp = next;

	}

	printf("%d", dp[2][s]);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

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

using namespace std;

typedef long long ll;

typedef pair<int,int> P;

typedef tuple<ll,ll,ll> T;

const long long INF = 1LL<<60;

const int MOD = 1000000000+7;

#define rev(s) (string((s).rbegin(), (s).rend()))

// cout << fixed << setprecision(10) << ans << endl; 有効桁数指定

// *min_element(c + l, c + r) *max_element(c + l, c + r) 配列の中のmin-max

// int dx[8]={1,1,0,-1,-1,-1,0,1};

// int dy[8]={0,1,1,1,0,-1,-1,-1};

// int dx[4]={1,0,-1,0};

// int dy[4]={0,1,0,-1};

// ~ は、-1の時だけfalse



int a[3010];

vector<ll> p(3010);



const int mod = 998244353;



int main () {



    int n,s;cin>>n>>s;



    rep(i,n) cin>>a[i];



    ll ans=0;



    rep(i,n) {

        vector<ll> q(3010);

        p[0]++;

        rep(j,s+1) {

            q[j]=(q[j]+p[j])%mod;

            if (j+a[i]<=s) {

                q[j+a[i]]=(q[j+a[i]]+p[j])%mod;

            }

        }

        ans=(ans+q[s])%mod;

        p=q;

    }



    cout<<ans<<endl;





}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

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

#define chmax(x,y) x = max(x,y)

#define chmin(x,y) x = min(x,y)

using namespace std;

typedef long long ll;

typedef pair<int,int> P;

typedef tuple<ll,ll,ll> T;

const long long INF = 1LL<<60;

const int MOD = 998244353;

#define rev(s) (string((s).rbegin(), (s).rend()))

template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };

// cout << fixed << setprecision(10) << ans << endl;

// *min_element(c + l, c + r) *max_element(c + l, c + r)

// int dx[8]={1,1,0,-1,-1,-1,0,1};

// int dy[8]={0,1,1,1,0,-1,-1,-1};

// int dx[4]={1,0,-1,0};

// int dy[4]={0,1,0,-1};

// struct Edge {

//   int to, id;

//   Edge(int to, int id): to(to), id(id) {}

// };





int main () {

  int N,S;cin>>N>>S;

  vector<int> a(N);

  rep(i,N) cin>>a[i];

  vector<ll> F(S+1,0),pre(S+1,0);

  ll ans = 0;

  rep(i,N) {

    pre[0] += 1;

    F = pre;

    rep(j,S+1) {

      if(j+a[i] <= S){

	F[j+a[i]] += pre[j];

	F[j+a[i]] %= MOD;

      }

    }

    pre = F;

    ans = (ans + F[S]) % MOD;

  }

  cout << ans << endl; 

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef long double ld;

#define rep(i, n) for (ll i = 0; i < n; i++)

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

#define is(a, b) a == b

#define len(v) ll(v.size())



//vector書き出し

template <class T>

void cout_vec(const vector<T> &vec1){

  rep(i,len(vec1)){

    cout<<vec1[i]<<' ';

  }

  cout<<'\n';

}



typedef pair<ll,ll> P;

const ll mod=1e9+7;



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);

    ll x;

    cin>>x;

    vector<ll> sum;

    sum.push_back(1);

    ll cnt=2;

    while(sum.back()<=1e9){

      sum.push_back(cnt+sum.back());

      cnt++;

    }

    cout<<lower_bound(begin(sum),end(sum),x)-begin(sum)+1<<endl;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef long double ld;

typedef pair<ll,ll> P;

typedef pair<int,int> Pi;

#define rep(i,n) for(ll i=0;i<n;i++)

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

#define fi first

#define se second

#define endl "\n"



template<typename T> inline bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}

template<typename T> inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}

template<typename T> ostream& operator<<(ostream& s,const complex<T>& d) {return s<<"("<<d.real()<<", "<<d.imag()<< ")";}

template<typename T1, typename T2> ostream& operator<<(ostream& s,const pair<T1,T2>& d) {return s<<"("<<d.first<<", "<<d.second<<")";}

template<typename T> ostream& operator<<(ostream& s, const vector<T>& d){int len=d.size();rep(i,len){s<<d[i];if(i<len-1) s<<" ";}return s;}

template<typename T> ostream& operator<<(ostream& s,const vector<vector<T>>& d){int len=d.size();rep(i,len){s<<d[i]<<endl;}return s;}

template<typename T> ostream& operator<<(ostream& s,const set<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}

template<typename T1, typename T2> ostream& operator<<(ostream& s,const map<T1,T2>& m){s<<"{"<<endl;for(auto itr=m.begin();itr!=m.end();++itr){s<<" "<<(*itr).first<<" : "<<(*itr).second<<endl;}s<<"}"<<endl;return s;}



const ll mod=1e9+7;

const ll inf=1e17;

const int INF=1e9;

const double PI=acos(-1);

const double EPS=1e-10;



int main(){

	cin.tie(0);ios::sync_with_stdio(false);

	ll x;

	cin>>x;

	ll n;

	rep(i,1e9){

		if(i*(i+1)>=2*x){

			n=i;

			break;

		}

	}

	ll y=n*(n+1)/2-x;

	if(y<=n){

		cout<<n<<endl;

	}else{

		cout<<y<<endl;

	}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cmath>

#include <vector>

#include <string>

#include <map>

#include <algorithm>

#include <tuple>

#include <set>

#include <stack>

#include <queue>

#include <deque>

#include <cstdio>

#include <numeric>

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

#define REPR(i, n) for(LL i = n;i >= 0;i--)

#define FOR(i, m, n) for(LL i = m;i < n;i++)

#define FORR(i, m, n) for(LL i = m;i >= n;i--)

#define SORT(v, n) sort(v, v+n);

#define VSORT(v) sort(v.begin(), v.end());

#define pb(a) push_back(a)

#define all(x) (x).begin(),(x).end()

#define INF (LL)1e15

#define MOD 1000000007

using namespace std;

typedef long long LL;

typedef pair<int, int> P;

typedef pair<LL, LL> LP;

typedef pair<int, P> PP;

typedef pair<LL, LP> LPP;

int dy[]={0, 0, 1, -1, 0};

int dx[]={1, -1, 0, 0, 0};



/*************** using variables ***************/

LL x;

vector<LL> ruiseki;

/**********************************************/



int main(){

    cin >> x;

    ruiseki.resize(1000000);

    

    ruiseki[0] = 0;



    LL i = 0;

    while(1){

        ruiseki[i+1] = ruiseki[i] + i+1;

        if(ruiseki[i+1] >= x){

            break;

        }

        i++;

    }

    cout << min(x, i+1) << endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

//#define int long long



using namespace std;

using LL = long long;

using P = pair<int, int>;



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

#define REP(i, n) FOR(i, 0, n)



#define pb(a) push_back(a)

#define all(x) (x).begin(),(x).end()



const int INF = (int)1e9;

const LL INFL = (LL)1e15;

const int MOD = 1e9 + 7;



int dy[]={0, 0, 1, -1, 0};

int dx[]={1, -1, 0, 0, 0};



signed main(){

    cin.tie(0);

    ios::sync_with_stdio(false);



    int x;

    cin >> x;

    int ans = 0, sum = 0;

    for(int i = 1; sum < x; i++){

        sum += i;

        ans++;

    }

    cout << ans << endl;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#define mod 1000000007

#define ll long long int

#define ar array

#define mp make_pair

using namespace std;



int main()

{

	ios::sync_with_stdio(false);

	cin.tie(NULL);

	int x;

	cin>>x;

	ll ans = 0, j= 0;

	ll a[int(1e5)];

	memset(a,0x3f,sizeof(a));

	a[0] = x;

	int i = 0;

	for(i = 1;i<x;i++)

	{

		ans = i*(i+1)/2;

		a[i] = i+(x-ans);

		if(ans>x)

		{

			a[i] = i;

			break;

		}

	}

	cout<<*min_element(a,a+int(1e5))<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

#define mod 1000000007

#define ll long long int

#define ar array

#define mp make_pair

using namespace std;



int main()

{

	ios::sync_with_stdio(false);

	cin.tie(NULL);

	int x;

	cin>>x;

	for(int i = sqrt(x);i<=x;i++)

	{

		ll ans = i*(i+1)/2;

		if(ans>=x)

		{

			cout<<i<<endl;

			break;

		}

	}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

const int maxn=311,maxt=200011;

int n,m,t,s[maxn],w[maxn][maxn],a[maxt],b[maxt];

void init(){

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

    for (int i=1;i<=m;++i) scanf("%d",s+i);

    for (int i=1;i<=n;++i) for (int j=1;j<=m;++j) scanf("%d",&w[i][j]);

    for (int i=1;i<=t;++i) scanf("%d%d",a+i,b+i);

}

bool check(int t){

    static int sx[maxn]; memcpy(sx,s,sizeof(s));

    static int wx[maxn][maxn]; memset(wx,0,sizeof(w));

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

        --sx[b[i]]; ++wx[a[i]][b[i]];

    }

    static bool vis[maxn]; memset(vis,0,sizeof(vis));

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

        for (int i=1;i<=n;++i) if (!vis[i]){

			bool flag=1;

			for (int j=1;j<=m;++j) if (wx[i][j]+max(0,sx[j])<w[i][j]){flag=0; break;}

            if (flag){

				vis[i]=1;

				for (int j=1;j<=m;++j) sx[j]+=wx[i][j];

            }

        }

    }

	for (int i=1;i<=n;++i) if (!vis[i]) return true;

	return false;

}

void work(){

    int t=1,w=::t;

    while (t<=w){

		int mid=(t+w)>>1;

		if (check(mid)) w=mid-1;else t=mid+1;

    }

    printf("%d\n",w==::t?-1:w+1);

}

int main(){

	init();

	work();

	return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

#define fi first

#define se second

#define mp make_pair

using namespace std;



typedef pair <int, int> pii;



int p, r, t;

int l[310], nl[310];

int n[310][310], nn[310][310];

pii a[200010];

int cnt[310];



bool check(int mid){

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

		nl[i] = l[i];

	}

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

		cnt[i] = 0;

		for (int j = 1; j <= r; j++){

			nn[i][j] = n[i][j], cnt[i] += n[i][j];

		}

	}

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

		int P = a[i].fi, R = a[i].se;

		nl[R]--, nn[P][R]--, cnt[P]--;

		if (cnt[P] == 0){

			for (int j = 1; j <= r; j++){

				nl[j] += n[P][j];

			}

		}

	}

	int pd = 1;

	while (pd){

		pd = 0;

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

			int flag = 1, ppp = 1;

			for (int j = 1; j <= r; j++){

				if (nl[j] < nn[i][j]){

					flag = 0;

					break;

				}

				if (nn[i][j]) ppp = 0;

			}

			if (!flag || ppp) continue;

			for (int j = 1; j <= r; j++){

				nl[j] += n[i][j] - nn[i][j];

				nn[i][j] = 0;

			}

			pd = 1;

		}

	}

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

		for (int j = 1; j <= r; j++){

			if (nn[i][j]) return 1;

		}

	}

	return 0;

}



int main(){

	scanf("%d%d%d", &p, &r, &t);

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

		scanf("%d", &l[i]);

	}

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

		for (int j = 1; j <= r; j++){

			scanf("%d", &n[i][j]);

		}

	}

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

		scanf("%d%d", &a[i].fi, &a[i].se);

	}

	if (!check(t - 1)){

		printf("-1\n");

		return 0;

	}

	int l = 0, r = t - 1;

	while (l < r){

		int mid = l + r >> 1;

		if (!check(mid)) l = mid + 1;

		else r = mid;

	}

	printf("%d\n", l + 1);

	return 0;

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#define pi 3.1415926535897932384626

using namespace std;



struct vec

{

    long double x,y;

    bool operator ==(const vec &a) const{

        return x==a.x&&y==a.y;

    }

    bool operator <(const vec &a) const{

        if(a.x!=x) return x<a.x;

        return y<a.y;

    }

    vec operator +(const vec &a) const{

        return {x+a.x,y+a.y};

    }

    vec operator *(const long double &a) const{

        return {x*a,y*a};

    }

    vec operator -(const vec &a) const{

        return {x-a.x,y-a.y};

    }

    vec operator /(const long double &a) const{

        return {x/a,y/a};

    }

    long double len() const{

        return (x*x+y*y);

    }

    long double dot(const vec &a) const{

        return x*a.x+y*a.y;

    }

    long double crs(const vec &a) const{

        return x*a.y-y*a.x;

    }

    vec proj(const vec &a) const{

        return (a/a.len())*(*this).dot(a)/a.len();

    }

};





struct P

{

    int x,y;

    bool operator <(const P &a) const{

        //if(x!=a.x)

         return x>a.x;



    }

};





long long x,y,z,mod=998244353;

//vector<long long> v,v1;

vector<P> v[300110];

//vector<long long> v1;

int i,n,m,k,a,d,b,c,h,dx[10]={1,0,-1,0},dy[10]={0,1,0,-1};

int e;

int l[311111];



int o[311111];



int j[211111];

stack<int> s;

//set<int> s;

queue<int> q,q1;

P u[1],u1[3];

//char r[1],r1[3];

string r,r1;

//2147483647

//'1'==49;

//'A'==65;

//'a'==97;

//unordered_

map<int,int> p;



//v.resize(unique(v.begin(),v.end())-v.begin());



//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

//rng();



bool as(P a,P b)

{

    return a.y<b.y;

}





int main()

{

    scanf("%lld %lld %lld",&x,&y,&z);

    if((z-y)%2==0) printf("%lld",(z-y)/2);

        else printf("%lld",min(y+(z-y)/2,x-z+1+(z-y)/2));

}




// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

#define pi 3.1415926535897932384626

using namespace std;

      

struct P{

  int x,y;

  bool operator < (const P &a )const{

    //if(y!=a.y)

    return y>a.y;

  };

};



int a,b,c,d,i,k,n,m,e,dx[10]={1,0,-1,0,1,1,-1,-1},dy[10]={0,1,0,-1,1,-1,1,-1};

int o[1];

int l[5];

int j[1];



long long x,y,z,mod=1000000007;

//string r;

char r[1];



P u[1];

queue<int> q;



//stack<int> s;

set<int> s;

map<int,int> p;

vector<P> v;



bool as(P a,P b)

{

  if(a.x==b.x)

  return a.y<b.y;

  return a.x<b.x;

}





int main()

{

  scanf("%lld %lld %lld",&z,&y,&x);

  if(x>y) swap(x,y);

  if((x-y)%2==0) printf("%lld",(y-x)/2);

  else

  {

    printf("%lld",min(x-1,z-y)+(y-x+1)/2);

  }

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdio>

using namespace std;

int a[1010],sum1[1010],sum2[1010],sum[1010];long long Sum1=0,Sum2=0,Sum;int cnt2=0,cnt1=0,cnt=0;

int ans[1010],Cnt=0;

int main()

{

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

	for(int i=1;i<=n;i++)scanf("%d",&a[i]);

	for(int i=1;i<=n;i+=2)if(a[i]>0)sum1[++cnt1]=i,Sum1+=a[i];

	for(int i=2;i<=n;i+=2)if(a[i]>0)sum2[++cnt2]=i,Sum2+=a[i];

	if(Sum1>Sum2){for(int i=1;i<=cnt1;i++)sum[i]=sum1[i];Sum=Sum1;cnt=cnt1;}

	else {for(int i=1;i<=cnt2;i++)sum[i]=sum2[i];Sum=Sum2;cnt=cnt2;}

	if(Sum==0)

	{

		int Max=-1e9-7,id;

		for(int i=1;i<=n;i++)if(a[i]>Max)Max=a[i],id=i;

		printf("%d\n",Max);

		for(int i=n;i>id;i--)ans[++Cnt]=i;

		for(int i=1;i<id;i++)ans[++Cnt]=1;

		printf("%d\n",Cnt);

		for(int i=1;i<=Cnt;i++)printf("%d\n",ans[i]);

		return 0; 

	}

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

	int l=sum[1],r=sum[cnt],K=0;

	for(int i=n;i>r;i--)ans[++Cnt]=i;

	for(int i=1;i<l;i++)ans[++Cnt]=1;

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

	{

		K++;

		int mid=(sum[i]-sum[i-1])>>1;

		for(int j=mid;j>=1;j--)ans[++Cnt]=1+j;

	}

	printf("%d\n",Cnt);

	for(int i=1;i<=Cnt;i++)printf("%d\n",ans[i]);

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

#include<cstring>

#define MN 10005

using namespace std;

typedef long long ll;

int n,fr[MN],maxn=1,ans[MN],res[MN],tt,tans;ll a[MN],f[MN];

int main(){

	scanf("%d",&n);

	for(int i=1;i<=n;i++)scanf("%lld",&a[i]),f[i]=a[i];

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

		for(int j=1;j<i;j++)if((i-j)%2==0&&f[j]+a[i]>f[i])f[i]=f[j]+a[i],fr[i]=j;

	for(int i=2;i<=n;i++)if(f[i]>f[maxn])maxn=i;printf("%lld\n",f[maxn]);

	for(int i=n;i>maxn;i--)res[++tans]=i;int tmp=maxn;ans[++tt]=maxn;

	while(fr[tmp])ans[++tt]=fr[tmp],tmp=fr[tmp];

	for(int i=1;i<ans[tt];i++)res[++tans]=1;

	for(int i=tt-1;i>=1;i--){

		for(int j=(ans[i]+ans[i+1])/2-ans[i+1]+1;j>1;j--)res[++tans]=j;

	}printf("%d\n",tans);

	for(int i=1;i<=tans;i++)printf("%d\n",res[i]);

}




// Fastest known solution for this problem:
// Original C++ solution (slower):




#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

using namespace std;

using namespace __gnu_pbds;

 

#define watch(x) cout<<(#x)<<"="<<(x)<<'\n'

#define mset(d,val) memset(d,val,sizeof(d))

#define setp(x) cout<<fixed<<setprecision(x)

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

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

#define pb push_back

#define mp make_pair

#define F first

#define S second

#define INF ll(1e18)

#define MOD 998244353

#define pqueue priority_queue

#define fbo find_by_order

#define ook order_of_key

typedef long long ll;

typedef pair<ll,ll> ii;

typedef vector<ll> vi;

typedef vector<ii> vii;

typedef long double ld;

typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds;

 

#define MAXN 1000000007

 

 

int main() {

	ll a,b,c;

	cin>>a>>b>>c;

	ll d=a-b;

	ll e=b-c;

	ll f=a-c;



	if ((d==0) or(e==0) or(f==0)) {

		if ((d==0) and(e==0) and(f==0)) {

			cout<<"No";

		}

		else {

			cout<<"Yes";



		}

	}

	else {

		cout<<"No";

	}

}

	

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main()

{

	int A, B, C;

	scanf ("%d %d %d", &A, &B, &C);



	(A==B && A==C && B==C) || (A!=B && A!=C && B!=C) ? puts ("No") : puts ("Yes");



	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef vector<int> vi;

typedef pair<int, int> ii;

typedef vector<ii> vii;



int main()

{

    int a, b, c; cin >> a >> b >> c;

    if ((a == b || b == c || c == a) && !(a == b && b == c))

        cout << "Yes" << '\n';

    else

        cout << "No" << '\n';

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main (){



	int a,b,c;

	

	scanf("%d %d %d",&a,&b,&c);



	if(a==b && a!=c && b!=c){

		printf("Yes\n");

	}else if(b==c && b!=a && c!=a){

		printf("Yes\n");

	}else if(a==c && a!=b && c!=b){

		printf("Yes\n");

	}else

		printf("No\n");



return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):


#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){

	int a,b,c;

	cin>>a>>b>>c;

	if(a==b&&a!=c||a==c&&b!=a||b==c&&b!=a) puts("Yes");

	else puts("No");

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main()

{

  int a, b, c;

  scanf("%d %d %d", &a, &b, &c);



  if ((a == c && b == a && b == c) || (a != c && b != a && b != c)) {

    puts("No");

  }

  else

  {

    puts("Yes");

  }

  

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

using namespace std;



int main()

{

	int a;

	int b;

	int c;

	cin >> a >> b >> c;

	if (a == b && a != c)

	{

		cout << "Yes";

	}

	else if (a == c && a != b)

	{

		cout << "Yes";

	}

	else if (b == c && a != b)

	{

		cout << "Yes";

	}

	else {

		cout << "No";

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main()

{

  int a, b, c;

  scanf("%d %d %d", &a, &b, &c);



  if ((a == c && b == a && b == c) || (a != c && b != a && b != c)) {

    puts("No");

  }

  else

  {

    puts("Yes");

  }

  

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main()

{

	int d,e,f;

	cin>>d>>e>>f;

	  if(d==e && e==f)

	    cout<<"No";

    else if(d==e || e == f || d==f)

	 {

	 	cout<<"Yes";

	 	

	 }



     else

         cout<<"No";

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main()

{

  int a, b, c;

  scanf("%d %d %d", &a, &b, &c);



  if ((a == c && b == a && b == c) || (a != c && b != a && b != c)) {

    puts("No");

  }

  else

  {

    puts("Yes");

  }

  

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main()

{

int A, B, C;

cin>>A>>B>>C;

if((A==B && B != C) || (A==C && A != B) ||(B==C && B != A) ) 

    cout<<"Yes";

else 

   cout<<"No";

return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main()

{

  int a, b, c;

  scanf("%d %d %d", &a, &b, &c);



  if ((a == c && b == a && b == c) || (a != c && b != a && b != c)) {

    puts("No");

  }

  else

  {

    puts("Yes");

  }

  

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

using namespace std;



int arr[3];

int main(){

    for(int i = 0;i<3;i++) scanf("%d",&arr[i]);

    sort(arr,arr+3);

    if(arr[0] == arr[1] && arr[1] != arr[2]){

        puts("Yes");

    }else if(arr[0] != arr[1] && arr[1] == arr[2]){

        puts("Yes");

    }else{

        puts("No");

    }





    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

int main(){

int a,b,c;

scanf("%d %d %d",&a,&b,&c);

if(a==b && a!=c || a==c && a!=b || b==c && b!=a) puts("Yes");

else puts("No");

return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main()

{

int a1,b1,c1;

cin>>a1>>b1>>c1;

if(a1==b1 && a1!=c1)

{

cout<<"Yes";

}

else if(b1==c1 && c1!=a1)

{

 cout<<"Yes";

}

else if(a1==c1 && a1!=b1)

{

 cout<<"Yes";

}

else

{

 cout<<"No";

}

return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

	int x,y,z;

	scanf("%d %d %d", &x, &y, &z);

	if((x==y && x!=z) || (x==z && x!=y) || (y==z && y!=x)){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	return 0;	

} 

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

 

using namespace std;

 

int main()

{

    int a,b,c;

    cin>>a>>b>>c;

    if(a==b && b==c)

    cout<<"No";

    else if(a==b || b==c || a==c)

    cout<<"Yes";

    else 

    cout<<"No";

    return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>



int main()

{

	int x,y,z;

	scanf("%d %d %d", &x, &y, &z);

	if((x==y && x!=z) || (x==z && x!=y) || (y==z && y!=x)){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	return 0;	

} 

// Fastest known solution for this problem: