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

using namespace std;



int a[20];



bool check(int x)

{

	int pre = 0;

	for (int i = 0; i < 10; i++) if (x & (1 << i))

	{

		if (a[i] < pre) return false;

		pre = a[i];

	}

	return true;

}



bool dfs(int i, int x, int pre)

{

	if (i == 10)

	{

		return check(x);

	}

	bool temp = false;

	if (a[i] > pre) temp = dfs(i + 1, x, a[i]);

	return temp || dfs(i + 1, x | (1 << i), pre);

}



int main()

{

	int T;

	cin >> T;

	while (T--)

	{

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

		printf("%s\n", dfs(1, 0, a[0]) ? "YES" : "NO");

	}

	return 0;

}

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

int a,l1,l2,n;

bool f;

int main()

{

	scanf("%d",&n);

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

	{

	    f=0;l1=0;l2=-1;

		for(int j=1;j<=10;j++)

		{

			scanf("%d",&a);

			if(!f&&a<l2&&a<l1){printf("NO\n");f=1;continue;}

			if(!f&&l1>l2)

			{

				if(l1<a)l1=a;

				else l2=a;

			} 

			if(!f&&l2>l1)

			{

				if(l2<a)l2=a;

				else l1=a;

			}

		}

		if(!f)printf("YES\n");

	}

}

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

using namespace std;

typedef long long ll;

const ll mod = 1e9 + 7;

#define N 200010



int f[N];

int pos[N][26];

char s[N];



int main() {

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

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

	int n = strlen(s + 1);

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

	f[n + 1] = 1, f[n + 2] = 0;

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

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

			pos[i][j] = pos[i + 1][j];

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

	}

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

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

			f[i] = min(f[i], f[pos[i][j] + 1] + 1);

	int now = 1;

	for(int j = f[1]; j; --j)

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

			if(f[now] == f[pos[now][i] + 1] + 1) {

				putchar(i + 'a');

				now = pos[now][i] + 1;

				break;

			}

}


// Optimized solution to the same problem (faster):
#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;

}

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

#include<cstdio>

#include<iomanip>

#include<algorithm>

#include<cstring>

#include<cstdlib>

#include<ctime>

#include<cmath>

#include<vector>

#include<queue>

#include<map>

#include<set>



#define ll long long

#define db double

#define rg register int



using namespace std;



int n;

string s;

int a[500005];

int f[500005][26];

int t[500005];



inline int qr(){

	register char ch; register bool sign=0; rg res=0;

	while(!isdigit(ch=getchar()))if(ch=='-')sign=1;

	while(isdigit(ch))res=res*10+(ch^48),ch=getchar();

	if(sign)return -res; else return res;

}



inline int dfs(int i){

	if(i==0)return 0;

	if(t[i])return t[i];

	t[i]=1e9;

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

		t[i]=min(t[i],dfs(f[i][j])+1);

	}return t[i];

}



int main(){

	cin>>s; n=s.size();

	for(rg i=1;i<=n;++i) a[i]=s[i-1]-'a';

	for(rg i=n-1;i>=1;--i){

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

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

		f[i][a[i+1]]=i+1;

	}

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

		f[n+1][j]=f[1][j];

	f[n+1][a[1]]=1;

	dfs(n+1);

	rg i=n+1,v=t[n+1];

	while(i){

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

			if(t[f[i][j]]==v-1){

				printf("%c",j+'a');

				i=f[i][j]; v=t[i];

				break;

			}

		}

	}puts("");

	return 0;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

 

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}


// 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;



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;

}

// Optimized solution to the same problem (faster):
#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;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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");

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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");

}




// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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" );

}




// Optimized solution to the same problem (faster):
#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");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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";

	}

}

// Optimized solution to the same problem (faster):
#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");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

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

#include <iostream>

#include <string>

#include <vector>

using namespace std;

 

const int MAXN = 1e5 + 10;

 

int N, M;

int C[MAXN];

 

int main()

{

	cin >> N >> M;

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

	{

		int u, v;

		cin >> u >> v;

		C[u]++, C[v]++;

	}

 

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

		if(C[i] & 1)

		{

			cout << "NO" << endl;

			return 0;

		}

 

	cout << "YES" << endl ;

 

	return 0;

}

 

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

#include<algorithm>

using namespace std;



const int MAXN=1e5+5;



int n,m;

int cnt[MAXN];



int main(){

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

    for(int i=1;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) return puts("NO"),0;

    puts("YES");

}


// Fastest known solution for this problem: