stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long lint;

typedef long double louble;



template<typename T1,typename T2> inline T1 max(T1 a,T2 b){return a<b?b:a;}

template<typename T1,typename T2> inline T1 min(T1 a,T2 b){return a<b?a:b;}



namespace ae86

{

	const int bufl = 1<<15;



	char buf[bufl],*s=buf,*t=buf;



	inline int fetch()

	{

		if(s==t){t=(s=buf)+fread(buf,1,bufl,stdin);if(s==t)return EOF;}

		return *s++;

	}



	inline int ty()

	{

		int a=0,b=1,c=fetch();

		while(!isdigit(c))b^=c=='-',c=fetch();

		while(isdigit(c))a=a*10+c-48,c=fetch();

		return b?a:-a;

	}



	template<typename T> inline int ts(T *s)

	{

		int a=0,c=fetch();

		while(c<=32 && c!=EOF)c=fetch();

		while(c>32 && c!=EOF)s[a++]=c,c=fetch();

		return a;

	}

}

using ae86::ty;

using ae86::ts;



const int alp = 26 , _ = 500007;



int n,s[_],las[alp],f[_],wha[_],nex[_];



int main()

{

	n=ts(s);

	for(int i=0;i<n;i++)s[i]-='a';

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



	memset(f,63,sizeof(f)),memset(nex,63,sizeof(nex));

	f[n+1]=0;

	for(int i=n-1;i>=0;i--)

	{

		las[s[i]]=i;

		for(int j=0;j<alp;j++)

			if(f[i]>f[las[j]+1]+1)

				f[i]=f[las[j]+1]+1,wha[i]=j,nex[i]=las[j]+1;

	}



	int now=0;

	while(now<n)putchar('a'+wha[now]),now=nex[now];

	puts("");



	return 0;

}


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

#include <string.h>

#define N 200002

#define M 26



char s[N], a[N], f[N];

int head[M] = {0}, last[N][M], c[N], l;



int dfs(int p, int d)

{

	int i, td = d + 1, tp;

	

	a[d] = s[p], f[d] = 1;

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

		if(d + c[tp = last[p][i]] < l){

			if(tp){

				if(td < l && dfs(tp, td)) return 1;

			}

			else{

				a[td] = i + 97, f[td] = 1;

				return 1;

			} 

		}

	}

	f[d] = 0;

	return 0;

}



int main()

{		

	int i, j, m, t, mp, tp;

		

	scanf("%s", s + 1);

	l = strlen(s + 1);

	for(i = l, c[0] = 0; i; i--){

		for(j = 0, m = l; j < M; j++){

			t = c[last[i][j] = head[j]];

			if(t < m) m = t;

		}

		c[i] = m + 1;

		head[s[i] - 97] = i;

	}

	

	for(i = 1, m = c[head[mp = 0]]; i < M; i++){

		if(c[head[i]] < c[head[mp]]) mp = i;

	}

	tp = head[mp];



	if(!tp){

		putchar(mp + 97);

		putchar(10);

		return 0;

	}

	l = c[tp];

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

	dfs(tp, 0);

	a[l + 1] = 0;

	for(i = l; !f[i]; i--) a[i] = 97;

	puts(a);

						

	return 0;

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

#include<cstring>

#include<cctype>

#include<algorithm>

using namespace std;

const int maxn=2e5+5;

int ls;

int nxt[26][maxn],pre[maxn],f[maxn];

char s[maxn],ch[maxn];

int main()

{

	scanf("%s",s+1);

	ls=strlen(s+1);

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

	{

	  int j=ls+1,p=ls;

	  while (j>=1)

	  {

	  	while (p>=1&&s[p]-'a'!=i)p--;

	  	while (j>=p+1)nxt[i][j]=p,j--;

	  	p--;

	  }

	}

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

	f[ls+1]=0;

	for (int i=ls+1;i>=1;i--){

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

			if (f[i]+1<f[nxt[j][i]]){

				f[nxt[j][i]]=f[i]+1;

				pre[nxt[j][i]]=i;

				ch[nxt[j][i]]='a'+j;

			}else{

				if (f[i]+1==f[nxt[j][i]])if (j<ch[nxt[j][i]]-'a'){

					pre[nxt[j][i]]=i;

					ch[nxt[j][i]]='a'+j;

				}else if (j==ch[nxt[j][i]]-'a'&&s[i]<s[pre[nxt[j][i]]]){

				  pre[nxt[j][i]]=i;

				  ch[nxt[j][i]]='a'+j;

				}

			}

		}

	}

	int p=0;

	printf("%c",ch[0]);

	while (pre[p]!=ls+1)putchar(s[pre[p]]),p=pre[p];

	return 0;

}

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

#include <cstring>

#define maxn 200010

#define N maxn / 26 + 10

char s[maxn];

int l[N], r[N];

int cnt[26];

int sum[maxn][26], nxt[maxn][26];

int n, m, sz, ans;

char find(int r, int l = 0) {

	for (int i = 0; i < 26; i++) if (!(sum[r][i] - sum[l][i])) return i + 97;

	return 20040826;

}

int main() {

	sz = sizeof cnt;

	scanf("%s", s + 1);

	n = strlen(s + 1);

	int num = 0; r[m = 1] = n;

	for (int i = n; i; i--) {

		memcpy(nxt[i], nxt[i + 1], sz);

		int x = s[i] - 'a';

		nxt[i][x] = i;

		num += cnt[x]++ == 0;

		if (num >= 26) {

			l[m] = i;

			r[++m] = i - 1;

			memset(cnt, 0, sz);

			num = 0;

		}

	}

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

		memcpy(sum[i], sum[i - 1], sz);

		sum[i][s[i] - 'a']++;

	}

	putchar(ans = find(r[m]));

	for (int i = m - 1; i; i--) putchar(ans = find(r[i], nxt[l[i]][ans - 'a']));

	putchar(10);

	return 0;

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

#define mem(a, b) memset(a, b, sizeof(a))

#define inf (1e9 + 7)

using namespace std;

typedef long long LL;

const LL mod = (1e9 + 7);



int nexts[200005][27], pos[27], dp[200005], pos2[200005], len;

char ch[200005];



void dfs(int u)

{

    if(dp[u] != -1)

        return;

    dp[u] = inf;

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

    {

        if(nexts[u][i] == len + 1)

        {

            if(dp[u] > 1)

                dp[u] = 1, pos2[u] = i;

        }

        else

        {

            dfs(nexts[u][i]);

            if(dp[u] > dp[nexts[u][i]] + 1)

                dp[u] = dp[nexts[u][i]] + 1, pos2[u] = i;

        }

    }

}



void pr(int a)

{

    printf("%c", pos2[a] + 'a');

    if(nexts[a][pos2[a]] == len + 1)

        return;

    pr(nexts[a][pos2[a]]);

}



int main()

{

    mem(dp, -1);

    scanf("%s", ch + 1);

    len = strlen(ch + 1);

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

        pos[i] = len + 1;

    for(int i = len;i >= 1;i--)

    {

        for(int j = 0;j < 26;j++)

            nexts[i][j] = pos[j];

        pos[ch[i] - 'a'] = i;

    }

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

        nexts[0][i] = pos[i];

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

    {

        if(dp[i] == -1)

            dfs(i);

    }

    int ans = inf, ans2;

    pr(0);

    puts("");

    return 0;

}


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

#define mem(a, b) memset(a, b, sizeof(a))

#define inf (1e9 + 7)

using namespace std;

typedef long long LL;

const LL mod = (1e9 + 7);



int pos[200005], len, nn = 0;

bool vis[27];

char ch[200005], ans[200005];





int main()

{

    scanf("%s", ch + 1);

    len = strlen(ch + 1);

    pos[++pos[0]] = len + 1;

    for(int i = len;i >= 1;i--)

    {

        int a = ch[i] - 'a';

        if(!vis[a])

            vis[a] = 1, nn++;

        if(nn == 26)

        {

            pos[++pos[0]] = i;

            mem(vis, 0);

            nn = 0;

        }

    }

    nn = 0;

    int l = 0;

    for(int i = pos[0];i >= 1;i--)

    {

        mem(vis, 0);

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

            vis[ch[j] - 'a'] = 1;

        int tmp = 0;

        while(vis[tmp])

            tmp++;

        ans[nn++] = tmp + 'a';

        if(i != 1)

        {

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

            {

                if(ch[j] == ans[nn - 1])

                {

                    l = j;

                    break;

                }

            }

        }

    }

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

    return 0;

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

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

using namespace std;



int p[300000][26];

vector<int>E[300000];

int dp[300000];



int main(){

	string s;cin>>s;

	rep(i,26)p[s.size()][i]=s.size()+1;

	for(int i=s.size()-1;i>=0;i--){

		rep(j,26){

			if(s[i]-'a'==j)p[i][j]=i+1;

			else p[i][j]=p[i+1][j];

			E[p[i][j]].push_back(i);

		}

	}

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

	dp[s.size()+1]=0;

	for(int i=s.size()+1;i>0;i--){

		for(auto v:E[i]){

			dp[v]=min(dp[v],dp[i]+1);

		}

	}

	int pos=0;

	string ans;

	while(pos!=s.size()+1){

		rep(i,26){

			if(dp[p[pos][i]]==dp[pos]-1){

				ans+='a'+i;

				pos=p[pos][i];

				break;

			}

		}

	}

	cout<<ans<<endl;

}

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

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

using namespace std;

 

int p[300000][26];

int dp[300000];

 

int main(){

	string s;cin>>s;

	rep(i,26)p[s.size()][i]=s.size()+1;

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

	dp[s.size()+1]=0;

	dp[s.size()]=1;

	for(int i=s.size()-1;i>=0;i--){

		rep(j,26){

			if(s[i]-'a'==j)p[i][j]=i+1;

			else p[i][j]=p[i+1][j];

			dp[i]=min(dp[i],dp[p[i][j]]+1);

		}

	}

	int pos=0;

	string ans;

	while(pos!=s.size()+1){

		rep(i,26){

			if(dp[p[pos][i]]==dp[pos]-1){

				ans+='a'+i;

				pos=p[pos][i];

				break;

			}

		}

	}

	cout<<ans<<endl;

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



using namespace std;



typedef long long ll;

typedef pair<int, int> PII;



const int MM = 1e9 + 7;

const double eps = 1e-8;

const int MAXN = 2e6 + 10;



int n, m;



void prework(){



}



void read(){



}



int deg[MAXN];



void solve(int casi){

//	cout << "Case #" << casi << ": ";

	cin >> n >> m;

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

		int x, y;

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

		deg[x]++;

		deg[y]++;

	}

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

		if (deg[i] & 1){

			puts("NO");

			return; 

		}

	puts("YES");

}



void printans(){



}



int main(){

//	std::ios::sync_with_stdio(false);

	prework();

	int T = 1;

//	cin>>T;

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

		read();

		solve(i);

		printans();

	}

	return 0;

}

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



int cnt[110000];



int main () {

	int N, M;

	scanf ("%d%d", &N, &M);

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

		int u, v;

		scanf ("%d%d", &u, &v);

		cnt[u]++;

		cnt[v]++;

	}

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

		if (cnt[i] & 1) {

			puts ("NO");

			return 0;

		}

	puts ("YES");

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



const int N = 1e5 + 5;

int cnt[N], n, m;



int main() {

	std::ios::sync_with_stdio(false);

	std::cin.tie(0);



	std::cin >> n >> m;

	while (m --) {

		int a, b; std::cin >> a >> b;

		++ cnt[a]; ++ cnt[b];

	}



	bool jieti = false;

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

		if (cnt[i] % 2) jieti = true;



	if (jieti) std::cout << "NO" << std::endl;

	else std::cout << "YES" << std::endl;

}

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



int cnt[110000];



int main () {

	int N, M;

	scanf ("%d%d", &N, &M);

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

		int u, v;

		scanf ("%d%d", &u, &v);

		cnt[u]++;

		cnt[v]++;

	}

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

		if (cnt[i] & 1) {

			puts ("NO");

			return 0;

		}

	puts ("YES");

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



using namespace std;



typedef long long ll;

typedef pair<int, int> PII;



const int MM = 1e9 + 7;

const double eps = 1e-8;

const int MAXN = 2e6 + 10;



int n, m;



void prework(){



}



void read(){



}



int deg[MAXN];



void solve(int casi){

//	cout << "Case #" << casi << ": ";

	cin >> n >> m;

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

		int x, y;

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

		deg[x]++;

		deg[y]++;

	}

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

		if (deg[i] & 1){

			puts("NO");

			return; 

		}

	puts("YES");

}



void printans(){



}



int main(){

//	std::ios::sync_with_stdio(false);

	prework();

	int T = 1;

//	cin>>T;

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

		read();

		solve(i);

		printans();

	}

	return 0;

}

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

#include<algorithm>

#define MAXN 100006

using namespace std;

int n,m,u,v,du[MAXN];

int main()

{

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

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

	{

		scanf("%d%d",&u,&v);

		du[u]++;

		du[v]++;

	}

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

		if(du[i]%2==1)

		{

			printf("NO");

			return 0;

		}

	printf("YES");

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



const int N = 1e5 + 5;

int cnt[N], n, m;



int main() {

	std::ios::sync_with_stdio(false);

	std::cin.tie(0);



	std::cin >> n >> m;

	while (m --) {

		int a, b; std::cin >> a >> b;

		++ cnt[a]; ++ cnt[b];

	}



	bool jieti = false;

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

		if (cnt[i] % 2) jieti = true;



	if (jieti) std::cout << "NO" << std::endl;

	else std::cout << "YES" << std::endl;

}

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

#include<algorithm>

#define MAXN 100006

using namespace std;

int n,m,u,v,du[MAXN];

int main()

{

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

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

	{

		scanf("%d%d",&u,&v);

		du[u]++;

		du[v]++;

	}

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

		if(du[i]%2==1)

		{

			printf("NO");

			return 0;

		}

	printf("YES");

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

#include<cstdio>

#include<cstdlib>

using namespace std;



const int maxn = 100010;

int N,M,A[maxn];



inline int gi()

{

	int ret = 0,f = 1; char ch;

	do ch = getchar(); while (!(ch >= '0'&&ch <= '9')&&ch != '-');

	if (ch == '-') f = -1,ch = getchar();

	do ret = ret*10+ch-'0',ch = getchar(); while (ch >= '0'&&ch <= '9');

	return ret*f;

}



inline bool check()

{

	for (int i = 1;i <= N;++i) if (A[i]&1) return false;

	return true;

}



int main()

{

	//freopen("H.in","r",stdin);

	//freopen("H.out","w",stdout);

	N = gi(); M = gi();

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

		A[gi()]++,A[gi()]++;

	if (check()) puts("YES"); else puts("NO");

	//fclose(stdin); fclose(stdout);

	return 0;

}


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

#include<algorithm>

#define MAXN 100006

using namespace std;

int n,m,u,v,du[MAXN];

int main()

{

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

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

	{

		scanf("%d%d",&u,&v);

		du[u]++;

		du[v]++;

	}

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

		if(du[i]%2==1)

		{

			printf("NO");

			return 0;

		}

	printf("YES");

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

using namespace std;



const int N = 100000 + 10;



int n, m;

int deg[N];



int main() {

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

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

		int u, v;

		scanf( "%d%d", &u, &v );

		deg[u]++;

		deg[v]++;

	}

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

		if( deg[u] & 1 ) {

			printf( "NO\n" );

			return 0;

		}

	}

	printf( "YES\n" );

}




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

#include<algorithm>

#define MAXN 100006

using namespace std;

int n,m,u,v,du[MAXN];

int main()

{

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

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

	{

		scanf("%d%d",&u,&v);

		du[u]++;

		du[v]++;

	}

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

		if(du[i]%2==1)

		{

			printf("NO");

			return 0;

		}

	printf("YES");

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

#include<cstdio>

#include<algorithm>

using namespace std;

int main()

{

	int n,m;

	while(cin>>n>>m)

	{

		int a[100000]={0};

		int b[100000],c[100000];

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

		{

			cin>>b[i]>>c[i];

		}

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

		{

			a[b[i]]++;

			a[c[i]]++;

		}

		int flag=1;

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

		{

			if(a[i]%2!=0)

				flag=0;

		}

		if(flag==1)

			cout<<"YES\n";

		else

			cout<<"NO\n";

	}

}

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

#include<algorithm>

#define MAXN 100006

using namespace std;

int n,m,u,v,du[MAXN];

int main()

{

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

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

	{

		scanf("%d%d",&u,&v);

		du[u]++;

		du[v]++;

	}

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

		if(du[i]%2==1)

		{

			printf("NO");

			return 0;

		}

	printf("YES");

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



using namespace std;



typedef long long ll;

typedef pair<int, int> PII;



const int MM = 1e9 + 7;

const double eps = 1e-8;

const int MAXN = 2e6 + 10;



int n, m;



void prework(){



}



void read(){



}



int deg[MAXN];



void solve(int casi){

//	cout << "Case #" << casi << ": ";

	cin >> n >> m;

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

		int x, y;

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

		deg[x]++;

		deg[y]++;

	}

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

		if (deg[i] & 1){

			puts("NO");

			return; 

		}

	puts("YES");

}



void printans(){



}



int main(){

//	std::ios::sync_with_stdio(false);

	prework();

	int T = 1;

//	cin>>T;

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

		read();

		solve(i);

		printans();

	}

	return 0;

}

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

int n, m;

int deg[100100];

int main()

{

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

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

	{

		int u, v;

		scanf("%d%d", &u, &v);

		deg[u]++; deg[v]++;

	}

	bool flag = false;

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

	{

		if (deg[i] & 1) { flag = true; break; }

	}

	if (flag) printf("NO\n");

	else printf("YES\n");

	return 0;

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



const int N = 1e5 + 5;

int cnt[N], n, m;



int main() {

	std::ios::sync_with_stdio(false);

	std::cin.tie(0);



	std::cin >> n >> m;

	while (m --) {

		int a, b; std::cin >> a >> b;

		++ cnt[a]; ++ cnt[b];

	}



	bool jieti = false;

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

		if (cnt[i] % 2) jieti = true;



	if (jieti) std::cout << "NO" << std::endl;

	else std::cout << "YES" << std::endl;

}

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

int n, m;

int deg[100100];

int main()

{

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

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

	{

		int u, v;

		scanf("%d%d", &u, &v);

		deg[u]++; deg[v]++;

	}

	bool flag = false;

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

	{

		if (deg[i] & 1) { flag = true; break; }

	}

	if (flag) printf("NO\n");

	else printf("YES\n");

	return 0;

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

#include<cstdio>

#include<cstdlib>

using namespace std;



const int maxn = 100010;

int N,M,A[maxn];



inline int gi()

{

	int ret = 0,f = 1; char ch;

	do ch = getchar(); while (!(ch >= '0'&&ch <= '9')&&ch != '-');

	if (ch == '-') f = -1,ch = getchar();

	do ret = ret*10+ch-'0',ch = getchar(); while (ch >= '0'&&ch <= '9');

	return ret*f;

}



inline bool check()

{

	for (int i = 1;i <= N;++i) if (A[i]&1) return false;

	return true;

}



int main()

{

	//freopen("H.in","r",stdin);

	//freopen("H.out","w",stdout);

	N = gi(); M = gi();

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

		A[gi()]++,A[gi()]++;

	if (check()) puts("YES"); else puts("NO");

	//fclose(stdin); fclose(stdout);

	return 0;

}


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

int n, m;

int deg[100100];

int main()

{

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

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

	{

		int u, v;

		scanf("%d%d", &u, &v);

		deg[u]++; deg[v]++;

	}

	bool flag = false;

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

	{

		if (deg[i] & 1) { flag = true; break; }

	}

	if (flag) printf("NO\n");

	else printf("YES\n");

	return 0;

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

using namespace std;



const int N = 100000 + 10;



int n, m;

int deg[N];



int main() {

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

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

		int u, v;

		scanf( "%d%d", &u, &v );

		deg[u]++;

		deg[v]++;

	}

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

		if( deg[u] & 1 ) {

			printf( "NO\n" );

			return 0;

		}

	}

	printf( "YES\n" );

}




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

int n, m;

int deg[100100];

int main()

{

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

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

	{

		int u, v;

		scanf("%d%d", &u, &v);

		deg[u]++; deg[v]++;

	}

	bool flag = false;

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

	{

		if (deg[i] & 1) { flag = true; break; }

	}

	if (flag) printf("NO\n");

	else printf("YES\n");

	return 0;

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

#include<cstdio>

#include<algorithm>

using namespace std;

int main()

{

	int n,m;

	while(cin>>n>>m)

	{

		int a[100000]={0};

		int b[100000],c[100000];

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

		{

			cin>>b[i]>>c[i];

		}

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

		{

			a[b[i]]++;

			a[c[i]]++;

		}

		int flag=1;

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

		{

			if(a[i]%2!=0)

				flag=0;

		}

		if(flag==1)

			cout<<"YES\n";

		else

			cout<<"NO\n";

	}

}

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

int n, m;

int deg[100100];

int main()

{

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

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

	{

		int u, v;

		scanf("%d%d", &u, &v);

		deg[u]++; deg[v]++;

	}

	bool flag = false;

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

	{

		if (deg[i] & 1) { flag = true; break; }

	}

	if (flag) printf("NO\n");

	else printf("YES\n");

	return 0;

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

using namespace std;

typedef long long ll;

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

#define rep1(i, n) for(int i = 1; i <= (n); i++)

#define co(x) cout << (x) << "\n"

#define cosp(x) cout << (x) << " "

#define ce(x) cerr << (x) << "\n"

#define cesp(x) cerr << (x) << " "

#define pb push_back

#define mp make_pair

#define Would

#define you

#define please





int main() {

	cin.tie(0);

	ios::sync_with_stdio(false);





	int N, M;

	cin >> N >> M;

	int A[100001] = {};

	rep(i, M) {

		int a, b;

		cin >> a >> b;

		A[a] ^= 1;

		A[b] ^= 1;

	}

	int ikeru = 1;

	rep1(i, N) if (A[i]) ikeru = 0;

	

	if (ikeru) co("YES");

	else co("NO");



	Would you please return 0;

}

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

using namespace std;

typedef long long ll;

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

#define rep1(i, n) for(int i = 1; i <= (n); i++)

#define co(x) cout << (x) << "\n"

#define cosp(x) cout << (x) << " "

#define ce(x) cerr << (x) << "\n"

#define cesp(x) cerr << (x) << " "

#define pb push_back

#define mp make_pair

#define Would

#define you

#define please



const int cm = 1 << 17;

char cn[cm], * ci = cn + cm, ct;

inline char getcha() {

	if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }

	return *ci++;

}

inline int getint() {

	int A = 0;

	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';

	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';

	return A;

}



int main() {

	cin.tie(0);

	ios::sync_with_stdio(false);





	int N = getint(), M = getint();

	bool A[100001] = {};

	rep(i, M + M) A[getint()] ^= true;

	bool ikeru = true;

	rep1(i, N) if (A[i]) ikeru = false;

	

	if (ikeru) co("YES");

	else co("NO");



	Would you please return 0;

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



using namespace std;



int main(void) {

    int N, M, cnt[100010] = {}, a, b;

    cin >> N >> M;

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

        cin >> a >> b;

        cnt[a]++;

        cnt[b]++;

    }



    bool flag = true;

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

        if (cnt[i] % 2) flag = false;

    

    if (flag) cout << "YES" << endl;

    else cout << "NO" << endl;



    return 0;

}

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

using namespace std;

using ll = long long;

using pii = pair<int, int>;



int N, M;

int a[100010], b[100010];

int cnt[100010];



int main() {

  cin.tie(0);

  ios_base::sync_with_stdio(false);

  cout << fixed << setprecision(10);

  

  cin >> N >> M;

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

    cin >> a[i] >> b[i];

    cnt[a[i]]++;

    cnt[b[i]]++;

  }

  int yes = 1;

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

    yes &= cnt[i] % 2 == 0;

  }

  cout << (yes ? "YES" : "NO") << endl;



  return 0;

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

#include<cstdio>

#include<cstring>

#include<cstdlib>

#include<algorithm>

#include<cmath>

using namespace std;

int n,m;

int a[100010],b[100010],cnt[100010];

int main(){

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

	int i,j;

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

		scanf("%d%d",&a[i],&b[i]);cnt[a[i]]++;cnt[b[i]]++;

	}

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

		if(cnt[i]%2!=0){

			printf("NO\n");return 0;

		}

	}

	printf("YES\n");return 0;

}

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

#define R register

#define ll long long

inline int read(){

	R int x; R bool f; R char c;

	for (f=0; (c=getchar())<'0'||c>'9'; f=c=='-');

	for (x=c^'0'; (c=getchar())>='0'&&c<='9'; x=(x<<3)+(x<<1)+(c^'0'));

	return f?-x:x;

}

#define MN 100005

int n,m,cnt[MN];

int main(){

	n=read(),m=read();

	while(m--) ++cnt[read()],++cnt[read()];

	for (R int i=1; i<=n; ++i) if (cnt[i]&1) return 0*puts("NO");

	puts("YES");return 0;

}