#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <fstream>

using namespace std;

#define maxN 100005

int N, M;
long long A[maxN], B[maxN];
long long costA[maxN], costB[maxN];

int main()
{
	freopen("input.txt","r",stdin);
	vector<long long> C;
	scanf("%d%d",&N,&M);
	for(int i=0;i<N;i++)
	{
		int x;
		scanf("%d",&x);
		A[i] = (long long)x;
	}
	for(int i=0;i<M;i++)
	{
		int x;
		scanf("%d",&x);
		B[i] = (long long)x;
	}
	sort(A,A+N);
	sort(B,B+M);
	set<long long> S;
	for(int i=0;i<N;i++)
		S.insert(A[i]);
	for(int i=0;i<M;i++)
		S.insert(B[i]);
	int indA = 0, indB = M-1;
	long long sum1 = 0, sum2 = 0;
	set<long long>::iterator it;
	int p1 = 0, p2 = 0;
	for(it=S.begin();it!=S.end();it++)
	{
		long long x = (*it);
		while( indA < N && A[indA] < x )
		{
			sum1 += A[indA];
			indA++;
		}
		costA[p1] = x*(long long)(indA) - sum1;
		// cout<<"yo: "<<x<<" "<<costA[p1]<<endl;
		p1++;
		C.push_back(x);
	}
	for(int i=C.size()-1;i>=0;i--)
	{
		long long x = C[i];
		while( indB >= 0 && B[indB] > x )
		{
			sum2 += B[indB];
			p2++;
			indB--;
		}
		costB[i] = sum2 - x*(long long)p2;
		// cout<<"yo: "<<x<<" "<<costB[i]<<endl;
	}
	long long ans = -1;
	for(int i=0;i<p1;i++)
	{
		if( ans == -1 )
			ans = costA[i] + costB[i];
		else
			ans = min(ans,costA[i]+costB[i]);
	}
	cout<<ans<<endl;
	if( N == 90670 && M == 90600 )
	{
		for(int i=0;i<p1;i++)
			if( costA[i] + costB[i] == 40779196397539ll )
				cout<<"YOLO1: "<<C[i];
			else if( costA[i] + costB[i] == 40776945308677ll )
				cout<<"YOLO2: "<<C[i]<<endl;
	}
	return 0;
}


#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <fstream>

using namespace std;

#define maxN 100005

int N, M;
long long A[maxN], B[maxN];
long long costA[maxN], costB[maxN];

int main()
{
	freopen("input.txt","r",stdin);
	vector<long long> C;
	scanf("%d%d",&N,&M);
	for(int i=0;i<N;i++)
	{
		int x;
		scanf("%d",&x);
		A[i] = (long long)x;
	}
	for(int i=0;i<M;i++)
	{
		int x;
		scanf("%d",&x);
		B[i] = (long long)x;
	}
	sort(A,A+N);
	sort(B,B+M);
	set<long long> S;
	for(int i=0;i<N;i++)
		S.insert(A[i]);
	for(int i=0;i<M;i++)
		S.insert(B[i]);
	int indA = 0, indB = M-1;
	long long sum1 = 0, sum2 = 0;
	set<long long>::iterator it;
	int p1 = 0, p2 = 0;
	for(it=S.begin();it!=S.end();it++)
	{
		long long x = (*it);
		while( indA < N && A[indA] < x )
		{
			sum1 += A[indA];
			indA++;
		}
		costA[p1] = x*(long long)(indA) - sum1;
		// cout<<"yo: "<<x<<" "<<costA[p1]<<endl;
		p1++;
		C.push_back(x);
	}
	for(int i=C.size()-1;i>=0;i--)
	{
		long long x = C[i];
		while( indB >= 0 && B[indB] > x )
		{
			sum2 += B[indB];
			p2++;
			indB--;
		}
		costB[i] = sum2 - x*(long long)p2;
		// cout<<"yo: "<<x<<" "<<costB[i]<<endl;
	}
	long long ans = -1;
	for(int i=0;i<p1;i++)
	{
		if( ans == -1 )
			ans = costA[i] + costB[i];
		else
			ans = min(ans,costA[i]+costB[i]);
	}
	cout<<ans<<endl;
	if( N == 90670 && M == 90600 )
	{
		for(int i=0;i<p1;i++)
			if( costA[i] + costB[i] == 40779196397539ll )
			{
				cout<<"YOLO1: "<<C[i];
				long long t1 = 0ll;
				for(int j=0;j<N;j++)
					if( A[j] < C[i] )
						t1 += C[i] - A[j];
				for(int j=0;j<M;j++)
					if( B[j] > C[i] )
						t1 += B[j] - C[i];
				cout<<"LOL2: "<<t1<<endl;
			}
			else if( costA[i] + costB[i] == 40776945308677ll )
				cout<<"YOLO2: "<<C[i]<<endl;
	}
	return 0;
}


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

int main(int argc, char const *argv[])
{//freopen("in.txt", "r", stdin);
	int n, m;
	cin >> n >>m ;
	int a[n+1];int b[m+1];
	for(int i = 0 ; i  < n ; i++)cin >> a[i];
	for(int i = 0 ; i  < m ; i++)cin >> b[i];
		if(n == 1 || m == 1){if(a[0] < b[m-1]){cout << abs(a[0]-b[m-1]);return 0;}}
int flag = 1,flag2 = 1;
	sort(a, a+n);
	sort(b, b+m);
	int op = 0;
	while(a[0] < b[m-1]){
		if(a[0]+1 <= a[1]){a[0]+=1;op++;}else flag2 = 0;
		if(b[m-1]-1 >= b[m-2]){b[m-1]-=1;op++;}else flag = 0;
		if(flag == 0 && flag2 == 0)break;
	}
	int op1= 0 ;int op2 = 0;
	int diff = b[m-1] - a[0];
	if(diff > 0){
	a[0] += diff;

	op1 += diff;

	for(int i = 1 ;i  < n ; i++){
		if(a[i] < a[0])op1 += (a[0]-a[i]);
	}
	b[m-1] -= diff;
	op2 += diff;
	for(int i = m-2; i>= 0;i--){
		if(b[i] > b[m-1])op2 += (b[i] - b[m-1]);
	}
}
	 cout << op + min(op1,op2) ;
	return 0;
}


#include "bits/stdc++.h"
using namespace std;
 #define ll long long
ll n, m;
ll a[100005], b[100005];
ll low = -1000000000LL, high = 1000000000LL, ans = 1000000000LL;
     ll i, j, k;
    ll mid1, mid2;
ll test(ll x)
{
    ll i, j, k = 0;
    for (i = 0; i < n; i++) {
        if (a[i] < x) {
           k += x-a[i];
        }
    }
    for (i = 0; i < m; i++) {
        if (b[i] > x) {
           k += b[i]-x;
        }
    }
    return k;
}
binary(){
while(low+2<high){
          mid1 = low + (high - low) / 3,
          mid2 = low + 2*(high - low) / 3,
          if (test(mid1) > test(mid2)) {
             low = mid1;
          } else {
             high = mid2;
          }
    }
    ans = test(low);
    for (i = low; i <= high; i++) {
        ans = min(ans, test(i));
    }
}

int main()
{

    cin >> n>> m;
    for (i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a, a+n);
    for (i = 0; i < m; i++) {
        cin >> b[i];
    }
    sort(b, b+m);
binary();
        cout << ans <<endl;
    return 0;
}


#include "bits/stdc++.h"
using namespace std;
#define ll long long
ll n, m;
ll a[100005];
vector<ll> b;
ll i, j, k;
ll mid1, mid2;
ll test(ll x)
{
    ll i, j, k = 0;
    for (i = 0; i < n; i++) {
        if (a[i] < x) {
           k += x-a[i];
        }
    }
    for (i = 0; i < m; i++) {
        if (b[i] > x) {
           k += b[i]-x;
        }
    }
    return k;
}
ll binary(ll low, ll high){
    while(low < high){
    ll mid =  (low+high) >> 1;
    if( test(mid+1) - test(mid) > 0){
        high = mid;
    }
    else {
        low = mid+1;
    }
}
    return low;
}

int main()
{

    cin >> n>> m;
    for (i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a, a+n);
    for (i = 0; i < m; i++) {
        int y;
        cin >> y;
        b.push_back(y);
    }
    sort(b.begin(), b.end());
    ll low = a[0];
    ll high = b[m-1];
ll a1 = binary(low, high);
        cout << test(a1) <<endl;
    return 0;
}


#include "bits/stdc++.h"
using namespace std;
 #define ll long long
ll n, m;
ll a[100005], b[100005];
ll low = -1000000000LL, high = 1000000000LL, ans = 1000000000LL;
     ll i, j, k;
    ll mid1, mid2;
ll test(ll x)
{
    ll i, j, k = 0;
    for (i = 0; i < n; i++) {
        if (a[i] < x) {
           k += x-a[i];
        }
    }
    for (i = 0; i < m; i++) {
        if (b[i] > x) {
           k += b[i]-x;
        }
    }
    return k;
}
binary(){
while(low+2<high){
          mid1 = low + (high - low) / 3,
          mid2 = high - (high - low) / 3;
          if (test(mid1) > test(mid2)) {
             low = mid1;
          } else {
             high = mid2;
          }
    }
    ans = test(low);
    for (i = low; i <= high; i++) {
        ans = min(ans, test(i));
    }
}

int main()
{

    cin >> n>> m;
    for (i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a, a+n);
    for (i = 0; i < m; i++) {
        cin >> b[i];
    }
    sort(b, b+m);
        cout << ans <<endl;
binary();
    return 0;
}


#include "bits/stdc++.h"
using namespace std;
 #define ll long long
ll n, m;
ll a[100005], b[100005];
ll low = -1000000000LL, high = 1000000000LL, ans = 1000000000LL;
     ll i, j, k;
    ll mid1, mid2;
ll test(ll x)
{
    ll i, j, k = 0;
    for (i = 0; i < n; i++) {
        if (a[i] < x) {
           k += x-a[i];
        }
    }
    for (i = 0; i < m; i++) {
        if (b[i] > x) {
           k += b[i]-x;
        }
    }
    return k;
}
binary(){
while(low+2<high){
          mid1 = low + (high - low) / 3;
          mid2 = low + 2*(high - low) / 3;
          if (test(mid1) > test(mid2)) {
             low = mid1;
          } else {
             high = mid2;
          }
    }
    ans = test(low);
    for (i = low; i <= high; i++) {
        ans = min(ans, test(i));
    }
}

int main()
{

    cin >> n>> m;
    for (i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a, a+n);
    for (i = 0; i < m; i++) {
        cin >> b[i];
    }
    sort(b, b+m);
binary();
        cout << ans <<endl;
    return 0;
}


#include "bits/stdc++.h"
using namespace std;
 #define ll long long
ll n, m;
ll a[100005], b[100005];
ll low = -1000000000LL, high = 1000000000LL, ans = 1000000000LL;
const double EPS = 1e-9;
     ll i, j, k;
    ll mid1, mid2;
ll test(ll x)
{
    ll i, j, k = 0;
    for (i = 0; i < n; i++) {
        if (a[i] < x) {
           k += x-a[i];
        }
    }
    for (i = 0; i < m; i++) {
        if (b[i] > x) {
           k += b[i]-x;
        }
    }
    return k;
}
binary(){
// while(low+2<high){
//           mid1 = low + (high - low) / 3,
//           mid2 = low + 2*(high - low) / 3,
//           if (test(mid1) > test(mid2)) {
//              low = mid1;
//           } else {
//              high = mid2;
//           }
//     }
//     ans = test(low);
//     for (i = low; i <= high; i++) {
//         ans = min(ans, test(i));
//     }
	while(high - low > EPS){
    ll g = low + (high-low)/3;
    ll h = low + 2*(high-low)/3;
    if(test(g) < test(h))
        high = h;
    else
        low = g;
}
return (high+low)/2;
}

int main()
{

    cin >> n>> m;
    for (i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a, a+n);
    for (i = 0; i < m; i++) {
        cin >> b[i];
    }
    sort(b, b+m);
        cout << binary() <<endl;
    return 0;
}


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

int main(int argc, char const *argv[])
{//freopen("in.txt", "r", stdin);
	int n, m;
	cin >> n >>m ;
	int a[n+1];int b[m+1];
	for(int i = 0 ; i  < n ; i++)cin >> a[i];
	for(int i = 0 ; i  < m ; i++)cin >> b[i];
		if(n == 1 || m == 1){if(a[0] < b[m-1])cout << abs(a[0]-b[m-1]);return 0;}
int flag = 1,flag2 = 1;
	sort(a, a+n);
	sort(b, b+m);
	int op = 0;
	while(a[0] < b[m-1]){
		if(a[0]+1 <= a[1]){a[0]+=1;op++;}else flag2 = 0;
		if(b[m-1]-1 >= b[m-2]){b[m-1]-=1;op++;}else flag = 0;
		if(flag == 0 && flag2 == 0)break;
	}
	int op1= 0 ;int op2 = 0;
	int diff = b[m-1] - a[0];
	if(diff > 0){
	a[0] += diff;

	op1 += diff;

	for(int i = 1 ;i  < n ; i++){
		if(a[i] < a[0])op1 += (a[0]-a[i]);
	}
	b[m-1] -= diff;
	op2 += diff;
	for(int i = m-2; i>= 0;i--){
		if(b[i] > b[m-1])op2 += (b[i] - b[m-1]);
	}
}
	 cout << op + min(op1,op2) ;
	return 0;
}


#include "bits/stdc++.h"
using namespace std;
 #define ll long long
ll n, m;
ll a[100005], b[100005];
ll low = -1000000000LL, high = 1000000000LL, ans = 1000000000LL;
     ll i, j, k;
    ll mid1, mid2;
ll test(ll x)
{
    ll i, j, k = 0;
    for (i = 0; i < n; i++) {
        if (a[i] < x) {
           k += x-a[i];
        }
    }
    for (i = 0; i < m; i++) {
        if (b[i] > x) {
           k += b[i]-x;
        }
    }
    return k;
}
binary(){
while(low+2<high){
          mid1 = low + (high - low) / 3,
          mid2 = high - (high - low) / 3;
          if (test(mid1) > test(mid2)) {
             low = mid1;
          } else {
             high = mid2;
          }
    }
    ans = test(low);
    for (i = low; i <= high; i++) {
        ans = min(ans, test(i));
    }
}

int main()
{

    cin >> n>> m;
    for (i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a, a+n);
    for (i = 0; i < m; i++) {
        cin >> b[i];
    }
    sort(b, b+m);
binary();
        cout << ans <<endl;
    return 0;
}


#include "bits/stdc++.h"
using namespace std;
 #define ll long long
ll n, m;
ll a[100005], b[100005];
ll low = -1000000000LL, high = 1000000000LL, ans = 1000000000LL;
     ll i, j, k;
    ll mid1, mid2;
ll test(ll x)
{
    ll i, j, k = 0;
    for (i = 0; i < n; i++) {
        if (a[i] < x) {
           k += x-a[i];
        }
    }
    for (i = 0; i < m; i++) {
        if (b[i] > x) {
           k += b[i]-x;
        }
    }
    return k;
}
binary(){
while(low+2<high){
          mid1 = low + (high - low) / 3,
          mid2 = high - (high - low) / 3;
          if (test(mid1) > test(mid2)) {
             low = mid1;
          } else {
             high = mid2;
          }
    }
    ans = test(low);
    for (i = low; i <= high; i++) {
        ans = min(ans, test(i));
    }
}

int main()
{

    cin >> n>> m;
    for (i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a, a+n);
    for (i = 0; i < m; i++) {
        cin >> b[i];
    }
    sort(b, b+m);
        cout << ans <<endl;
    return 0;
}


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

#define mii map<int,int>
#define ii pair<int,int>
#define ll long long

struct dat{
	int val, times, smtor, tot;
};

typedef vector<dat> vd;

dat f1(ii it, vd &vdevu){
	dat d2;
	d2.val = it.first;
	d2.times = it.second;
	d2.tot = vdevu[vdevu.size()-1].tot + d2.times;
	d2.smtor = vdevu[vdevu.size()-1].smtor + vdevu[vdevu.size()-1].tot*(it.first - vdevu[vdevu.size()-1].val);
	return d2;
}

int binsearch(vd &v, int p){
	int ini = 0, fini = v.size()-1;
	while(fini-ini > 1){
		int md = (fini+ini)/2;
		if (v[md].val < p)
			ini = md;
		else
			fini = md;
	}
	if (v[fini].val > p)
		return ini;
	return fini;
}

bool prt;

ll getTimes(vd &vdevu, vd &vbrother, int p){
	int it1 = binsearch(vdevu, p);
	ll times = (ll)(vdevu[it1].smtor + (p - vdevu[it1].val)*vdevu[it1].tot);
	int it2 = binsearch(vbrother, p);
	if (vbrother[it2].val < p)
		it2++;
	times += (ll)(vbrother[it2].smtor + (vbrother[it2].val - p)*vbrother[it2].tot);
	return times;
}

int main(){
	int n, m, x;
	scanf("%d%d", &n, &m);
	mii devu, brother;
	int mindevu = 999999999;
	for (int i = 0; i < n; i++){
		scanf("%d", &x);
		devu[x]++;
		mindevu = min(mindevu, x);
	}
	int maxbrother = 0;
	for (int i = 0; i < m; i++){
		scanf("%d", &x);
		brother[x]++;
		maxbrother = max(maxbrother, x);
	}
	vd vdevu, vbrother;
	dat d;
	d.val = 0;
	d.times = 0;
	d.smtor = 0;
	d.tot = 0;
	vdevu.push_back(d);
	for (mii::iterator it = devu.begin(); it != devu.end(); it++){
		dat d2;
		d2.val = it->first;
		d2.times = it->second;
		d2.tot = vdevu[vdevu.size()-1].tot + d2.times;
		d2.smtor = vdevu[vdevu.size()-1].smtor + vdevu[vdevu.size()-1].tot*(it->first - vdevu[vdevu.size()-1].val);
		vdevu.push_back(d2);
	}
	d.val = maxbrother+1;
	d.times = 0;
	d.smtor = 0;
	vbrother.push_back(d);
	for (mii::reverse_iterator it = brother.rbegin(); it != brother.rend(); it++){
		dat d2;
		d2.val = it->first;
		d2.times = it->second;
		d2.tot = vbrother[0].tot + d2.times;
		d2.smtor = vbrother[0].smtor + vbrother[0].tot*(vbrother[0].val-it->first);
		vbrother.insert(vbrother.begin(), d2);
	}
	int ini = mindevu, fini = maxbrother;

	while(fini - ini > 2){
		int p1 = ini + (fini-ini)/3;
		int p2 = ini + (fini-ini)*2/3;
		if (getTimes(vdevu, vbrother, p1) < getTimes(vdevu, vbrother, p2))
			fini = p2;
		else
			ini = p1;
	}
	ll ans = getTimes(vdevu, vbrother, ini);
	ans = min(ans, getTimes(vdevu, vbrother, fini));
	if (fini - ini > 1)
		ans = min(ans, getTimes(vdevu, vbrother, fini-1));
	printf ("%lld\n", ans);
}

// 1524327681549


/*input
3 2
1 2 3
3 4
*/

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

int main()
{
	int N, M;
	scanf("%d %d", &N, &M);

	long long int x[N];
	long long int y[M];

	for(int i=0; i<N; ++i)
		scanf("%Ld", x+i);

	for(int i=0; i<M; ++i) {
		scanf("%Ld", y+i);
		y[i] = -y[i];
	}

	sort(x, x+N);
	sort(y, y+M);

	long long int answer = 0;

	for(int i=0; i<min(N,M); ++i) {
		y[i] = -y[i];

		if(y[i] > x[i])
			answer += (y[i] - x[i]);
		else
			break;
	}

	printf("%Ld\n", answer);

	return 0;
}
// 1513378301824


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

int N, M;
const int MAX = 1e5+10;
typedef unsigned long long int ull;
ull x[MAX], y[MAX];

ull calc(ull value)
{
	ull current = 0LL;

	for(int i=0; i<N; ++i)
		if(value > x[i])
			current += (value-x[i]);

	for(int i=0; i<M; ++i)
		if(value < y[i])
			current += (y[i]-value);

	return current;
}

int main()
{
	ull MAXN = 0LL;
	scanf("%d %d", &N, &M);

	for(int i=0; i<N; ++i)
		scanf("%Ld", &x[i]);

	for(int i=0; i<M; ++i)
		scanf("%Ld", &y[i]);

	ull first  = 0LL;
	ull last   = (ull) 1e9+1;
	ull answer = (ull) 1e18;

	for(int i=0; i<300; ++i)
	{
		ull md1 = (first * 2LL + last) / 3LL;
		ull md2 = (first + 2LL * last) / 3LL;

		ull MD1 = calc(md1);
		ull MD2 = calc(md2);

		if(MD1 < MD2)
			last = md2;
		else
			first = md1;

		answer = min(answer, min(MD1, MD2));
	}

	printf("%Ld\n", answer);
	return 0;
}
// 1513390174787


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

int main()
{
	int N, M;
	scanf("%d %d", &N, &M);

	int x[N];
	int y[M];

	for(int i=0; i<N; ++i)
		scanf("%d", x+i);

	for(int i=0; i<M; ++i) {
		scanf("%d", y+i);
		y[i] = -y[i];
	}

	sort(x, x+N);
	sort(y, y+M);

	long long int answer = 0;

	for(int i=0; i<min(N,M); ++i) {
		y[i] = -y[i];

		if(y[i] > x[i])
			answer += (y[i] - x[i]);
	}

	for(int i=N; i<M; ++i)
		answer -= y[i];

	printf("%Ld\n", answer);

	return 0;
}
// 1513198773983


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

#define mii map<int,int>
#define ii pair<int,int>
#define ll long long

struct dat{
	ll val, times, smtor, tot;
};

typedef vector<dat> vd;

dat f1(ii it, vd &vdevu){
	dat d2;
	d2.val = it.first;
	d2.times = it.second;
	d2.tot = vdevu[vdevu.size()-1].tot + d2.times;
	d2.smtor = vdevu[vdevu.size()-1].smtor + vdevu[vdevu.size()-1].tot*(it.first - vdevu[vdevu.size()-1].val);
	return d2;
}

int binsearch(vd &v, int p){
	int ini = 0, fini = v.size()-1;
	while(fini-ini > 1){
		int md = (fini+ini)/2;
		if (v[md].val < p)
			ini = md;
		else
			fini = md;
	}
	if (v[fini].val > p)
		return ini;
	return fini;
}

bool prt;

ll getTimes(vd &vdevu, vd &vbrother, int p){
	int it1 = binsearch(vdevu, p);
	ll times = (ll)(vdevu[it1].smtor + (p - vdevu[it1].val)*vdevu[it1].tot);
	int it2 = binsearch(vbrother, p);
	if (vbrother[it2].val < p)
		it2++;
	times += (ll)(vbrother[it2].smtor + (vbrother[it2].val - p)*vbrother[it2].tot);
	return times;
}

int main(){
	int n, m, x;
	scanf("%d%d", &n, &m);
	mii devu, brother;
	int mindevu = 999999999;
	for (int i = 0; i < n; i++){
		scanf("%d", &x);
		devu[x]++;
		mindevu = min(mindevu, x);
	}
	int maxbrother = 0;
	for (int i = 0; i < m; i++){
		scanf("%d", &x);
		brother[x]++;
		maxbrother = max(maxbrother, x);
	}
	vd vdevu, vbrother;
	dat d;
	d.val = 0;
	d.times = 0;
	d.smtor = 0;
	d.tot = 0;
	vdevu.push_back(d);
	for (mii::iterator it = devu.begin(); it != devu.end(); it++){
		dat d2;
		d2.val = it->first;
		d2.times = it->second;
		d2.tot = vdevu[vdevu.size()-1].tot + d2.times;
		d2.smtor = vdevu[vdevu.size()-1].smtor + vdevu[vdevu.size()-1].tot*(it->first - vdevu[vdevu.size()-1].val);
		vdevu.push_back(d2);
	}
	list<dat> vbrotherL;
	d.val = maxbrother+1;
	d.times = 0;
	d.smtor = 0;
	vbrotherL.push_front(d);
	for (mii::reverse_iterator it = brother.rbegin(); it != brother.rend(); it++){
		dat d2;
		d2.val = it->first;
		d2.times = it->second;
		d2.tot = vbrotherL.front().tot + d2.times;
		d2.smtor = vbrotherL.front().smtor + vbrotherL.front().tot*(vbrotherL.front().val-it->first);
		vbrotherL.push_front(d2);
	}
	while(!vbrotherL.empty()){
		vbrother.push_back(vbrotherL.front());
		vbrotherL.pop_front();
	}
	int ini = mindevu, fini = maxbrother;

	while(fini - ini > 2){
		int p1 = ini + (fini-ini)/3;
		int p2 = ini + (fini-ini)*2/3;
		if (getTimes(vdevu, vbrother, p1) < getTimes(vdevu, vbrother, p2))
			fini = p2;
		else
			ini = p1;
	}
	ll ans = getTimes(vdevu, vbrother, ini);
	ans = min(ans, getTimes(vdevu, vbrother, fini));
	if (fini - ini > 1)
		ans = min(ans, getTimes(vdevu, vbrother, fini-1));
	printf ("%lld\n", ans);
}

// 1524328691927


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

int N, M;
int const MAX = 1e5+10;
long long int x[MAX], y[MAX];

long long int calc(int value)
{
	long long int current = 0;

	for(int i=0; i<N; ++i)
		if(value > x[i]) current += (value-x[i]);

	for(int i=0; i<M; ++i)
		if(value < y[i]) current += (y[i]-value);

	return current;
}

int main()
{
	scanf("%d %d", &N, &M);

	for(int i=0; i<N; ++i)
		scanf("%Ld", &x[i]);

	for(int i=0; i<M; ++i)
		scanf("%Ld", &y[i]);

	long long int first  = 0LL;
	long long int last   = 1LL*1e9;
	long long int answer = last*100;

	while(first <= last)
	{
		long long int md1 = (first*2+last) / 3;
		long long int md2 = (first+2*last) / 3;

		long long int MD1 = calc(md1);
		long long int MD2 = calc(md2);

		if(MD1 < MD2)
			last = md2 - 1;
		else
			first = md1 + 1;

		answer = min(answer, min(MD1, MD2));
	}

	printf("%Ld\n", answer);
	return 0;
}
// 1513385976397


#include<bits/stdc++.h>
#include <ext/numeric>
using namespace std;
#define sc(a) scanf("%d",&a)
#define sc2(a,b) scanf("%d%d",&a,&b)
#define sc3(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define sc4(a,b,c,d) scanf("%d%d%d%d",&a,&b,&c,&d)
#define scd(a) scanf("%lf",&a)
#define scd2(a,b) scanf("%lf%lf",&a,&b)
#define scd3(a,b,c) scanf("%lf%lf%lf",&a,&b,&c)
#define scd4(a,b,c,d) scanf("%lf%lf%lf%lf",&a,&b,&c,&d)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define ALL(x) x.begin(), x.end()
#define BUFF ios::sync_with_stdio(false);
#define endl "\n"
#define power(a,x) __gnu_cxx::power(a, x)
#define forN(i,n) for(int i=0;i<n;i++)
#define eps 1e-5
#define INF INT_MAX
#define INFLL LLONG_MAX
#define gcd(a,b) __gcd(a,b)
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vector<int> >vvi;

#define MAXN 100100
ll v1[MAXN];
ll v2[MAXN];
vector<ll> aux;

ll pre1[MAXN];
ll pre2[MAXN];

int main()
{
    BUFF
    int n,m;
    cin>>n>>m;
    for(int i=0;i<n;i++)cin>>v1[i],aux.pb(v1[i]);
    for(int i=0;i<m;i++)cin>>v2[i],aux.pb(v2[i]);
    sort(v1,v1+n);
    sort(v2,v2+m);
    //reverse(v2,v2+n);
    if(v1[0]>=v2[m-1])
    {
        cout<<0<<endl;
        return 0;
    }
    pre1[0]=0;
    pre2[0]=0;
    for(int i=1;i<=n;i++)pre1[i]=pre1[i-1]+v1[i-1];
    for(int i=1;i<=m;i++)pre2[i]=pre2[i-1]+v2[i-1];
    ll mn=INFLL;
    for(int i=0;i<aux.size();i++)
    {
        ll a=aux[i];
        int l1=lower_bound(v1,v1+n,a)-v1;
        int l2=upper_bound(v2,v2+m,a)-v2;
        ll s1=l1*a-pre1[l1];
        ll s2=(pre2[m]-pre2[min(l2,m)])-a*(m-min(l2,m));
        mn=min(mn,s1+s2);
    }
    cout<<mn<<endl;
    return 0;
}

// 1489375864333


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

#define mii map<int,int>
#define ii pair<int,int>

struct dat{
	int val, times, smtor, tot;
};

typedef vector<dat> vd;

dat f1(ii it, vd &vdevu){
	dat d2;
	d2.val = it.first;
	d2.times = it.second;
	d2.tot = vdevu[vdevu.size()-1].tot + d2.times;
	d2.smtor = vdevu[vdevu.size()-1].smtor + vdevu[vdevu.size()-1].tot*(it.first - vdevu[vdevu.size()-1].val);
	return d2;
}

int binsearch(vd &v, int p){
	int ini = 0, fini = v.size()-1;
	while(fini-ini > 1){
		int md = (fini+ini)/2;
		if (v[md].val < p)
			ini = md;
		else
			fini = md;
	}
	if (v[fini].val > p)
		return ini;
	return fini;
}

int getTimes(vd &vdevu, vd &vbrother, int p){
	int it1 = binsearch(vdevu, p);
	int times = vdevu[it1].smtor + (p - vdevu[it1].val)*vdevu[it1].tot;
	int it2 = binsearch(vbrother, p);
	if (vbrother[it2].val < p)
		it2++;
	times += vbrother[it2].smtor + (vbrother[it2].val - p)*vbrother[it2].tot;
	//printf ("(%d) -<%d %d> [%d][%d] = %d\n", p, it1, it2, vdevu[it1].smtor + (p - vdevu[it1].val)*vdevu[it1].tot, vbrother[it2].smtor + (vbrother[it2].val - p)*vbrother[it2].tot, times);
	return times;
}

int main(){
	int n, m, x;
	scanf("%d%d", &n, &m);
	mii devu, brother;
	int mindevu = 999999999;
	for (int i = 0; i < n; i++){
		scanf("%d", &x);
		devu[x]++;
		mindevu = min(mindevu, x);
	}
	int maxbrother = 0;
	for (int i = 0; i < m; i++){
		scanf("%d", &x);
		brother[x]++;
		maxbrother = max(maxbrother, x);
	}
	vd vdevu, vbrother;
	dat d;
	d.val = 0;
	d.times = 0;
	d.smtor = 0;
	d.tot = 0;
	vdevu.push_back(d);
	for (mii::iterator it = devu.begin(); it != devu.end(); it++){
		dat d2;
		d2.val = it->first;
		d2.times = it->second;
		d2.tot = vdevu[vdevu.size()-1].tot + d2.times;
		d2.smtor = vdevu[vdevu.size()-1].smtor + vdevu[vdevu.size()-1].tot*(it->first - vdevu[vdevu.size()-1].val);
		vdevu.push_back(d2);
	}
	d.val = maxbrother+1;
	d.times = 0;
	d.smtor = 0;
	vbrother.push_back(d);
	for (mii::reverse_iterator it = brother.rbegin(); it != brother.rend(); it++){
		dat d2;
		d2.val = it->first;
		d2.times = it->second;
		d2.tot = vbrother[0].tot + d2.times;
		d2.smtor = vbrother[0].smtor + vbrother[0].tot*(vbrother[0].val-it->first);
		vbrother.insert(vbrother.begin(), d2);
	}
	for (int i = mindevu; i <= maxbrother; i++){
		getTimes(vdevu, vbrother, i);
	}

	int ini = mindevu, fini = maxbrother;
	while(fini - ini > 2){
		int p1 = ini + (fini-ini)/3;
		int p2 = ini + (fini-ini)*2/3;
		if (getTimes(vdevu, vbrother, p1) < getTimes(vdevu, vbrother, p2))
			fini = p1;
		else
			ini = p2;
	}
	printf ("%d\n", min(getTimes(vdevu, vbrother, ini), getTimes(vdevu, vbrother, fini)));
}

// 1524326373929


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

int N, M;
int const MAX = 1e5+10;
typedef unsigned long long int ull;
ull x[MAX], y[MAX];

ull calc(int value)
{
	ull current = 0LL;

	for(int i=0; i<N; ++i)
		if(value > x[i]) current += (value-x[i]);

	for(int i=0; i<M; ++i)
		if(value < y[i]) current += (y[i]-value);

	return current;
}

int main()
{
	ull MAXN = 0LL;
	scanf("%d %d", &N, &M);

	for(int i=0; i<N; ++i) {
		scanf("%Ld", &x[i]);
		MAXN = max(MAXN, x[i]);
	}

	for(int i=0; i<M; ++i){
		scanf("%Ld", &y[i]);
		MAXN = max(MAXN, y[i]);
	}

	ull first  = 0LL;
	ull last   = MAXN;
	ull answer = (ull) 1e12;

	while(first <= last)
	{
		ull md1 = (first*2+last) / 3;
		ull md2 = (first+2*last) / 3;

		ull MD1 = calc(md1);
		ull MD2 = calc(md2);

		if(MD1 < MD2)
			last = md2 - 1;
		else
			first = md1 + 1;

		answer = min(answer, min(MD1, MD2));
	}

	printf("%Ld\n", answer);
	return 0;
}
// 1513386960098


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

int n,m,x[100001],y[100001],l=0,p=0,z[200001],mn=-1;

int main()
{
	int i,j,k=0;
	scanf("%d %d",&n,&m);
	for(i=1; i<=n; i++) scanf("%d",&x[i]);
	for(i=1; i<=m; i++) scanf("%d",&y[i]);

	sort(x+1,x+n+1); sort(y+1,y+m+1);

	j=m;
	for(i=1; i<=n; i++)
{
	if(j==0) break;
	if(x[i]<y[j]) k+=y[j]-x[i];
	j--;

}
printf("%d",k);
return 0;
}


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

int n,m,x[100001],y[100001],l=0,p=-1,z[200001];

int main()
{
	int i,j,k=0,a;
	scanf("%d %d",&n,&m);
	for(i=1; i<=n; i++) scanf("%d",&x[i]);
	for(i=1; i<=m; i++) scanf("%d",&y[i]);

	sort(x+1,x+n+1); sort(y+1,y+m+1);

	for(i=1; i<=m; i++)
	if(y[i]>x[1]) z[++l]=y[i];

	if(l==0){printf("0"); return 0;}

	for(i=1; i<=n; i++) if(y[m]>x[i])z[++l]=x[i]; else break;

	sort(z+1,z+l+1);

	a=l/(l/2);

	for(j=(l/2)-a*20; j<=(l/2)+a*20; j++)
{
	k=0;

	if(j<1 || j>l) continue;

	for(i=1; i<=l; i++){
	if(z[j]>z[i])k+=z[j]-z[i]; else k+=z[i]-z[j];
	}

	if(p==-1) p=k; else p=min(p,k);
}
	cout<<p;
return 0;
}


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

int n,m,x[100001],y[100001];

int main()
{
	int i,j;
	long long k=0;
	scanf("%d %d",&n,&m);
	for(i=1; i<=n; i++) scanf("%d",&x[i]);
	for(i=1; i<=m; i++) scanf("%d",&y[i]);

	sort(x+1,x+n+1); sort(y+1,y+m+1);

	j=m;
	for(i=1; i<=n; i++)
{
	if(j==0) break;
	if(x[i]<y[j]) k+=y[j]-x[i];
	j--;

}
printf("%I64d",k);
return 0;
}


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

int n,m,x[100001],y[100001],l=0,p=-1,z[200001];

int main()
{
	int i,j,k=0,a;
	scanf("%d %d",&n,&m);
	for(i=1; i<=n; i++) scanf("%d",&x[i]);
	for(i=1; i<=m; i++) scanf("%d",&y[i]);

	sort(x+1,x+n+1); sort(y+1,y+m+1);

	for(i=1; i<=m; i++)
	if(y[i]>x[1]) z[++l]=y[i];

	if(l==0){printf("0"); return 0;}

	for(i=1; i<=n; i++) if(y[m]>x[i])z[++l]=x[i]; else break;

	sort(z+1,z+l+1);

	a=l/(l/2);

	for(j=(l/2)-a*10; j<=(l/2)+a*10; j++)
{
	k=0;

	if(j<1 && j>l) continue;

	for(i=1; i<=l; i++){
	if(z[j]>z[i])k+=z[j]-z[i]; else k+=z[i]-z[j];
	}

	if(p==-1) p=k; else p=min(p,k);
}
	cout<<p;
return 0;
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;

int map[502][502],num[502];
char ans[502];

int main()
{
//	freopen("C:\\Users\\ZDH\\Desktop\\a.txt","r",stdin);
	memset(map,0,sizeof map);
	memset(num,0,sizeof num);
	memset(ans,'a',sizeof ans);
	int x,y,n=0;
	while(~scanf("%d %d",&x,&y))
	{
		map[x][y]=1;
		map[y][x]=1;
		num[x]++;
		num[y]++;
		n++;
	}
	for(int i=1;i<=n;i++)
		if(num[i]=n-1)	ans[i]='b';

	int k=0;
	while(ans[++k]=='b' && k<=n);
	for(int i=1;i<=n;i++)
	{
		if(map[k][i]==1 && ans[i]!='b')
			ans[i]='c';
	}

	for(int i=1;i<=n;i++)
		for(int j=i+1;j<=n;j++)
		{
			int nu=abs(ans[i]-ans[j]);
			if(map[i][j])
				if(nu==2)
				{
					printf("NO");
					return 0;
				}
			else
				if(nu!=2)
				{
					printf("NO");
					return 0;
				}
		}
	printf("YES\n");
	for(int i=1;i<=n;i++)
		printf("%c",ans[i]);
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;

int map[502][502],num[502];
int ans[502];

int main()
{
	freopen("C:\\Users\\ZDH\\Desktop\\a.txt","r",stdin);
	memset(map,0,sizeof map);
	memset(num,0,sizeof num);
	memset(ans,0,sizeof ans);
	int x,y,n=0;
	while(~scanf("%d %d",&x,&y))
	{
		map[x][y]=1;
		map[y][x]=1;
		num[x]++;
		num[y]++;
		n=max(n,max(x,y));
	}
//	for(int i=1;i<=n;i++)
//		printf("%c ",ans[i]);

	for(int i=1;i<=n;i++)
		if(num[i]==n-1)	ans[i]=2;

	int k=0;
	while(ans[++k]==2 && k<=n);
	ans[k]=3;
	for(int i=1;i<=n;i++)
	{
		if(map[k][i]==1 && ans[i]!=2)
			ans[i]=3;
	}
	for(int i=1;i<=n;i++)
        if(!ans[i])
            ans[i]=1;

//	for(int i=1;i<=n;i++)
//		printf("%c ",ans[i]);

	for(int i=1;i<=n;i++)
		for(int j=i+1;j<=n;j++)
		{
			int nu=abs(ans[i]-ans[j]);
			if(nu==2)
			{
				if(map[i][j])
				{
					printf("NO");
					return 0;
				}
			}
			if(nu<=1)
			{
				if(!map[i][j])
				{
					printf("NO");
					return 0;
				}
			}
		}
	printf("YES\n");
	for(int i=1;i<=n;i++)
	{
//		printf("%c",ans[i]);
		switch(ans[i]){
			case 1:printf("a");break;
			case 2:printf("b");break;
			case 3:printf("c");break;
		}
	}
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;

int map[502][502],num[502];
char ans[502];

int main()
{
//	freopen("C:\\Users\\ZDH\\Desktop\\a.txt","r",stdin);
	memset(map,0,sizeof map);
	memset(num,0,sizeof num);
	memset(ans,'a',sizeof ans);
	int x,y,n=0;
	while(~scanf("%d %d",&x,&y))
	{
		map[x][y]=1;
		map[y][x]=1;
		num[x]++;
		num[y]++;
		n=max(n,max(x,y));
	}
//	for(int i=1;i<=n;i++)
//		printf("%c ",ans[i]);

	for(int i=1;i<=n;i++)
		if(num[i]==n-1)	ans[i]='b';

	int k=0;
	while(ans[++k]=='b' && k<=n);
	ans[k]='c';
	for(int i=1;i<=n;i++)
	{
		if(map[k][i]==1 && ans[i]!='b')
			ans[i]='c';
	}

//	for(int i=1;i<=n;i++)
//		printf("%c ",ans[i]);

	for(int i=1;i<=n;i++)
		for(int j=i+1;j<=n;j++)
		{
			int nu=abs(ans[i]-ans[j]);
			if(nu==2)
			{
				if(map[i][j])
				{
					printf("NO");
					return 0;
				}
			}
			if(nu<=1)
			{
				if(!map[i][j])
				{
					printf("NO");
					return 0;
				}
			}
		}
	printf("YES\n");
	for(int i=1;i<=n;i++)
		printf("%c",ans[i]);
}


#include<stdio.h>
#include<string.h>

int map[502][502],num[502];
char ans[502];

int judge(int k,int n)
{
	for(int i=1;i<=n;i++)
	{
		if(map[k][i]==0)
			if(ans[k]-ans[i]==2 || ans[k]-ans[i]==-2)
				return 1;
	}
}
int main()
{
//	freopen("C:\\Users\\ZDH\\Desktop\\a.txt","r",stdin);
	memset(map,0,sizeof map);
	memset(num,0,sizeof num);
	memset(ans,'b',sizeof ans);
	int x,y,n=0;
	while(~scanf("%d %d",&x,&y))
	{
		map[x][y]=1;
		map[y][x]=1;
		num[x]++;
		num[y]++;
		n++;
	}
	for(int i=1;i<=n;i++)
		if(num[i])
		{
			for(int j=1;j<=n;j++)
				if(map[i][j]==1 && ans[j]!='b')
					ans[j]='a';
			if(num[i]==3)	ans[i]='b';
		}
	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
		{
			if(map[i][j]==0)
			{
				if(ans[i]=='a')
					ans[j]='c';
				if(ans[i]='c')
					ans[j]='a';
			}
		}
	for(int i=1;i<=n;i++)
	{
		if(num[i]==0)
		{
			if(judge(i,n))
			{
				printf("NO");
				return 0;
			}
		}
	}
	printf("YES\n");
	for(int i=1;i<=n;i++)
		printf("%c",ans[i]);
}


#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;

int map[502][502],num[502];
char ans[502];

int main()
{
//	freopen("C:\\Users\\ZDH\\Desktop\\a.txt","r",stdin);
	memset(map,0,sizeof map);
	memset(num,0,sizeof num);
	memset(ans,'a',sizeof ans);
	int x,y,n=0;
	while(~scanf("%d %d",&x,&y))
	{
		map[x][y]=1;
		map[y][x]=1;
		num[x]++;
		num[y]++;
		n++;
	}
	for(int i=1;i<=n;i++)
		if(num[i]=n-1)	ans[i]='b';

	int k=0;
	while(ans[++k]=='b' && k<=n);
	for(int i=1;i<=n;i++)
	{
		if(map[k][i]==1 && ans[i]!='b')
			ans[i]='c';
	}

	for(int i=1;i<=n;i++)
		for(int j=i+1;j<=n;j++)
		{
			int nu=ans[i]-ans[j];
			if(map[i][j])
				if(nu==2 || nu==-2)
				{
					printf("NO");
					return 0;
				}
			else
				if(nu<2 && nu>-2)
				{
					printf("NO");
					return 0;
				}
		}
	printf("YES\n");
	for(int i=1;i<=n;i++)
		printf("%c",ans[i]);
}


#include<stdio.h>
#include<string.h>
#include<math.h>

int map[502][502],num[502];
char ans[502];

int main()
{
//	freopen("C:\\Users\\ZDH\\Desktop\\a.txt","r",stdin);
	memset(map,0,sizeof map);
	memset(num,0,sizeof num);
	memset(ans,'a',sizeof ans);
	int x,y,n=0;
	while(~scanf("%d %d",&x,&y))
	{
		map[x][y]=1;
		map[y][x]=1;
		num[x]++;
		num[y]++;
		n++;
	}
	for(int i=1;i<=n;i++)
		if(num[i]=n-1)	ans[i]='b';

	int k=0;
	while(ans[++k]=='b' && k<=n);
	for(int i=1;i<=n;i++)
	{
		if(map[k][i]==1 && ans[i]!='b')
			ans[i]='c';
	}

	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
		{
			if(map[i][j])
				if(abs(ans[i]-ans[j])==2)
				{
					printf("NO");
					return 0;
				}
			else
				if(abs(ans[i]-ans[j])!=2)
				{
					printf("NO");
					return 0;
				}
		}
	printf("YES\n");
	for(int i=1;i<=n;i++)
		printf("%c",ans[i]);
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	char ans[MAXN+5];
	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 < n) {
			puts("NO");
			return 0;
		}

		bool nocomp = false;
		for (int j = 0; j < SZ(neigh); ++j) {
			for (int k = j+1; k < SZ(neigh); ++k) {
				int v = neigh[j], u = neigh[k];
				if (!adj[v][u]) {
					nocomp = true;
					if (ans[v] == 'c' || ans[u] == 'a') {
						puts("NO");
						return 0;
					}
					ans[v] = 'a', ans[u] = 'c';
				}
			}
		}

		if (nocomp) {
			ans[i] = 'b';
			break;
		}
		else {
			for (int j = 0; j < n; ++j) {
				ans[neigh[j]] = 'a';
			}
			break;
		}

	}
	puts("YES");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

    return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];
char ans[MAXN+5];

int fill(int v, char c) {
	if (ans[v] != 'z' && ans[v] != 'b' && ans[v] != c) return 0;
	if (vis[v]) return 1;
	vis[v] = 1;
	ans[v] = c;
	int ret = 1;
	for (int i = 0; i < v; ++i) {
		if (adj[v][i]) ret &= fill(i, c);
	}
	return ret;
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 == n) {
			ans[i] = 'b';
			vis[i] = 1;
		}
	}

	bool found = false;
	int v1 = 0, v2 = 0;
	for (int i = 0; i < n && !found; ++i) {
		for (int j = i+1; j < n && !found; ++j) {
			if (ans[i] == 'b' || ans[j] == 'b') continue;
			if (!adj[i][j]) {
				found = true;
				v1  = i, v2 = j;
			}
		}
	}

	if (found) {
		vector<int> n1;
		n1.PB(v1);
		for (int i = 0; i < n; ++i) {
			if (adj[v1][i] && ans[i] == 'z') n1.PB(i);
		}

		vector<int> n2;
		n2.PB(v2);
		for (int i = 0; i < n; ++i) {
			if (adj[v2][i] && ans[i] == 'z') n2.PB(i);
		}

		for (int i = 0; i < SZ(n1); ++i)
			for (int j = 0; j < SZ(n2); ++j) {
				if (n1[i] == n2[j]) {
					puts("No");
					return 0;
				}
				if (adj[n1[i]][n2[j]]) {
					puts("No");
					return 0;
				}
			}
		for (int i = 0; i < SZ(n1); ++i) {
			for (int j = i+1; j < SZ(n1); ++j) {
				if (!adj[n1[i]][n1[j]]) {
					puts("No");
					return 0;
				}
			}
		}

		for (int i = 0; i < SZ(n2); ++i) {
			for (int j = i+1; j < SZ(n2); ++j) {
				if (!adj[n2[i]][n2[j]]) {
					puts("No");
					return 0;
				}
			}
		}

		for (int i = 0; i < SZ(n1); ++i) {
			ans[n1[i]] = 'a';
		}
		for (int i = 0; i < SZ(n2); ++i) {
			ans[n2[i]] = 'c';
		}
	}

	for (int i = 0; i < n; ++i) {
		if (ans[i] == 'z') {
			puts("No");
			return 0;
		}
	}

	puts("Yes");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

	return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];
char ans[MAXN+5];

int fill(int v, char c) {
	if (ans[v] != 'z' && ans[v] != 'b' && ans[v] != c) return 0;
	if (vis[v]) return 1;
	vis[v] = 1;
	ans[v] = c;
	int ret = 1;
	for (int i = 0; i < v; ++i) {
		if (adj[v][i]) ret &= fill(i, c);
	}
	return ret;
}

int main(){
	scanf("%d%d", &n, &m);

	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 == n) {
			ans[i] = 'b';
			vis[i] = 1;
		}
	}

	bool found = false;
	int v1 = 0, v2 = 0;
	for (int i = 0; i < n && !found; ++i) {
		for (int j = i+1; j < n && !found; ++j) {
			if (ans[i] == 'b' || ans[j] == 'b') continue;
			if (!adj[i][j]) {
				found = true;
				v1  = i, v2 = j;
			}
		}
	}

	if (found) {
		fill(v1, 'a');
		int r = fill(v2, 'c');
		if (!r) {
			puts("No");
			return 0;
		}
		for (int i = 0; i < n; ++i) {
			if (ans[i] == 'z') {
				puts("No");
				return 0;
			}
		}
	}

	puts("Yes");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

	return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];
char ans[MAXN+5];

int fill(int v, char c) {
	if (ans[v] != 'z' && ans[v] != c) return 0;
	if (vis[v]) return 1;
	vis[v] = 1;
	ans[v] = c;
	int ret = 1;
	for (int i = 0; i < v; ++i) {
		if (adj[v][i]) ret &= fill(i, c);
	}
	return ret;
}

int main(){
	scanf("%d%d", &n, &m);

	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 == n) {
			ans[i] = 'b';
			vis[i] = 1;
		}
	}

	bool found = false;
	int v1 = 0, v2 = 0;
	for (int i = 0; i < n && !false; ++i) {
		for (int j = i+1; j < n && !false; ++j) {
			if (ans[i] == 'b' || ans[j] == 'b') continue;
			if (!adj[i][j]) {
				found = true;
				v1  = i, v2 = j;
			}
		}
	}

	if (found) {
		fill(v1, 'a');
		int r = fill(v2, 'c');
		if (!r) {
			puts("No");
			return 0;
		}
		for (int i = 0; i < n; ++i) {
			if (ans[i] == 'z') {
				puts("No");
				return 0;
			}
		}
	}

	puts("Yes");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

	return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
	freopen((s + ".in").c_str(), "r", stdin);
	freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];
char ans[MAXN+5];

void fill(int v, char c) {
	if (vis[v]) return;
	vis[v] = 1;
	ans[v] = c;
	for (int i = 0; i < v; ++i) {
		if (adj[v][i]) fill(i, c);
	}
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 == n) {
			ans[i] = 'b';
			vis[i] = 1;
		}
	}

	for (int i = 0; i < n; ++i) {
		for (int j = i+1; j < n; ++j) {
			if (ans[i] == 'b' || ans[j] == 'b') continue;
			if (!adj[i][j]) {
				if (ans[i] == 'c' || ans[j] == 'a') {
					puts("NO");
					return 0;
				}
				ans[i] = 'a', ans[j] = 'c';
			}
		}
	}

	for (int i = 0; i < n; ++i) {
		if (!vis[i] && ans[i] != 'z') fill(i, ans[i]);
	}

	for (int i = 0; i < n; ++i) {
		if (ans[i] == 'z') {
			puts("NO");
			return 0;
		}
	}

	puts("YES");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

	return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];
char ans[MAXN+5];

int fill(int v, char c) {
	if (ans[v] != 'z' && ans[v] != 'b' && ans[v] != c) return 0;
	if (vis[v]) return 1;
	vis[v] = 1;
	ans[v] = c;
	int ret = 1;
	for (int i = 0; i < v; ++i) {
		if (adj[v][i]) ret &= fill(i, c);
	}
	return ret;
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 == n) {
			ans[i] = 'b';
			vis[i] = 1;
		}
	}

	bool found = false;
	int v1 = 0, v2 = 0;
	for (int i = 0; i < n && !found; ++i) {
		for (int j = i+1; j < n && !found; ++j) {
			if (ans[i] == 'b' || ans[j] == 'b') continue;
			if (!adj[i][j]) {
				found = true;
				v1  = i, v2 = j;
			}
		}
	}

	if (found) {
		vector<int> n1;
		n1.PB(v1);
		for (int i = 0; i < n; ++i) {
			if (adj[v1][i] && ans[i] == 'z') n1.PB(i);
		}
		for (int i = 0; i < SZ(n1); ++i) {
			for (int j = i+1; j < SZ(n1); ++j) {
				if (!adj[n1[i]][n1[j]]) {
					puts("No");
					return 0;
				}
			}
		}

		vector<int> n2;
		n2.PB(v2);
		for (int i = 0; i < n; ++i) {
			if (adj[v2][i] && ans[i] == 'z') n2.PB(i);
		}
		for (int i = 0; i < SZ(n2); ++i) {
			for (int j = i+1; j < SZ(n2); ++j) {
				if (!adj[n2[i]][n2[j]]) {
					puts("No");
					return 0;
				}
			}
		}

		for (int i = 0; i < SZ(n1); ++i) {
			ans[n1[i]] = 'a';
		}
		for (int i = 0; i < SZ(n2); ++i) {
			ans[n2[i]] = 'c';
		}
	}

	puts("Yes");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

	return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];
char ans[MAXN+5];

int fill(int v, char c) {
	if (ans[v] != 'z' && ans[v] != 'b' && ans[v] != c) return 0;
	if (vis[v]) return 1;
	vis[v] = 1;
	ans[v] = c;
	int ret = 1;
	for (int i = 0; i < v; ++i) {
		if (adj[v][i]) ret &= fill(i, c);
	}
	return ret;
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 == n) {
			ans[i] = 'b';
			vis[i] = 1;
		}
	}

	bool found = false;
	int v1 = 0, v2 = 0;
	for (int i = 0; i < n && !found; ++i) {
		for (int j = i+1; j < n && !found; ++j) {
			if (ans[i] == 'b' || ans[j] == 'b') continue;
			if (!adj[i][j]) {
				found = true;
				v1  = i, v2 = j;
			}
		}
	}

	if (found) {
		vector<int> n1;
		n1.PB(v1);
		for (int i = 0; i < n; ++i) {
			if (adj[v1][i] && ans[i] == 'z') n1.PB(i);
		}
		for (int i = 0; i < SZ(n1); ++i) {
			for (int j = i+1; j < SZ(n1); ++j) {
				if (!adj[n1[i]][n1[j]]) {
					puts("No");
					return 0;
				}
			}
		}

		vector<int> n2;
		n2.PB(v2);
		for (int i = 0; i < n; ++i) {
			if (adj[v2][i] && ans[i] == 'z') n2.PB(i);
		}

		for (int i = 0; i < SZ(n2); ++i) {
			for (int j = i+1; j < SZ(n2); ++j) {
				if (!adj[n2[i]][n2[j]]) {
					puts("No");
					return 0;
				}
			}
		}

		for (int i = 0; i < SZ(n1); ++i) {
			ans[n1[i]] = 'a';
		}
		for (int i = 0; i < SZ(n2); ++i) {
			ans[n2[i]] = 'c';
		}
	}

	for (int i = 0; i < n; ++i) {
		if (ans[i] == 'z') {
			puts("No");
			return 0;
		}
	}

	puts("Yes");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

	return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
	freopen((s + ".in").c_str(), "r", stdin);
	freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];
bool fail = false;
char ans[MAXN+5];

void fill(int v, char c) {
	if (ans[v] != 'z' && ans[v] != 'b' && ans[v] != c) {
		fail = true;
		return;
	}
	if (vis[v]) return;
	vis[v] = 1;
	ans[v] = c;
	for (int i = 0; i < v; ++i) {
		if (adj[v][i]) fill(i, c);
	}
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 == n) {
			ans[i] = 'b';
			vis[i] = 1;
		}
	}

	for (int i = 0; i < n; ++i) {
		for (int j = i+1; j < n; ++j) {
			if (ans[i] == 'b' || ans[j] == 'b') continue;
			if (!adj[i][j]) {
				if (ans[i] == 'c' || ans[j] == 'a') {
					puts("NO");
					return 0;
				}
				ans[i] = 'a', ans[j] = 'c';
			}
		}
	}

	for (int i = 0; i < n; ++i) {
		if (!vis[i] && ans[i] != 'z') fill(i, ans[i]);
		if (fail) {
			puts("NO");
			return 0;
		}
	}

	for (int i = 0; i < n; ++i) {
		if (ans[i] == 'z') {
			puts("NO");
			return 0;
		}
	}

	puts("YES");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

	return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	char ans[MAXN+5];
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) ans[j] = 'z';
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 < n) {
			puts("NO");
			return 0;
		}

		bool nocomp = false;
		for (int j = 0; j < SZ(neigh); ++j) {
			for (int k = j+1; k < SZ(neigh); ++k) {
				int v = neigh[j], u = neigh[k];
				if (!adj[v][u]) {
					nocomp = true;
					if (ans[v] == 'c' || ans[u] == 'a') {
						puts("NO");
						return 0;
					}
					ans[v] = 'a', ans[u] = 'c';
				}
			}
		}

		if (nocomp) {
			ans[i] = 'b';
			break;
		}
		else {
			for (int j = 0; j < n; ++j) {
				ans[j] = 'a';
			}
			break;
		}

	}
	puts("YES");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

    return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	char ans[MAXN+5];
	for (int i = 0; i < n; ++i) ans[i] = 'z';
	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 < n) {
			puts("NO");
			return 0;
		}

		bool nocomp = false;
		for (int j = 0; j < SZ(neigh); ++j) {
			for (int k = j+1; k < SZ(neigh); ++k) {
				int v = neigh[j], u = neigh[k];
				if (!adj[v][u]) {
					nocomp = true;
					if (ans[v] == 'c' || ans[u] == 'a') {
						puts("NO");
						return 0;
					}
					ans[v] = 'a', ans[u] = 'c';
				}
			}
		}

		if (nocomp) {
			ans[i] = 'b';
			break;
		}
		else {
			for (int j = 0; j < n; ++j) {
				ans[j] = 'a';
			}
			break;
		}

	}
	puts("YES");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

    return 0;
}


/* DELAPAN.3gp */
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <utility>
#include <numeric>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;

#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC)
#else
#define debug(...)
#define GetTime()
#endif

//type definitions
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> vint;

//abbreviations
#define A first
#define B second
#define F first
#define S second
#define MP make_pair
#define PB push_back

//macros
#define REP(i,n) for (int i = 0; i < (n); ++i)
#define REPD(i,n) for (int i = (n)-1; 0 <= i; --i)
#define FOR(i,a,b) for (int i = (a); i <= (b); ++i)
#define FORD(i,a,b) for (int i = (a); (b) <= i; --i)
#define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define RESET(a,x) memset(a,x,sizeof(a))
#define EXIST(a,s) ((s).find(a) != (s).end())
#define MX(a,b) a = max((a),(b));
#define MN(a,b) a = min((a),(b));

inline void OPEN(const string &s) {
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}

/* -------------- end of DELAPAN.3gp's template -------------- */

#define MAXN 500

int n, m;
int adj[MAXN+5][MAXN+5];
int vis[MAXN+5];
char ans[MAXN+5];

void fill(int v, char c) {
	if (vis[v]) return;
	vis[v] = 1;
	ans[v] = c;
	for (int i = 0; i < v; ++i) {
		if (adj[v][i]) fill(i, c);
	}
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i = 0; i < m; ++i) {
		int u,v;
		scanf("%d%d", &u, &v);
		--u, --v;
		adj[u][v] = adj[v][u] = 1;
	}

	for (int i = 0; i < n; ++i) {
		vector<int> neigh;
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			if (adj[i][j]) neigh.PB(j);
		}
		if (SZ(neigh)+1 == n) {
			ans[i] = 'b';
			vis[i] = 1;
		}
	}

	for (int i = 0; i < n; ++i) {
		for (int j = i+1; j < n; ++j) {
			if (ans[i] == 'b' || ans[j] == 'b') continue;
			if (!adj[i][j]) {
				if (ans[i] == 'c' || ans[j] == 'a') {
					puts("NO");
					return 0;
				}
				ans[i] = 'a', ans[j] = 'c';
			}
		}
	}

	for (int i = 0; i < n; ++i) {
		if (!vis[i] && ans[i] != 'z') fill(i, ans[i]);
	}

	puts("YES");
	for (int i = 0; i < n; ++i)
		putchar(ans[i]);
	puts("");

    return 0;
}


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

typedef long long ll;
typedef double ld;
typedef pair<ll,ll> pl;

#define sl(x) scanf("%lld",&x)
#define pl(x) printf("%lld\n",x);
#define sf(x) sort(x.begin(),x.end(),func)
#define s(x) sort(x.begin(),x.end())
#define pb push_back
#define all(v) v.begin(),v.end()
#define rs(v) { s(v) ; r(v) ; }
#define r(v) {reverse(all(v));}
#define mp make_pair
#define F first
#define S second
#define f(i,n) for(int i=0;i<n;i++)
#define fab(i,a,b) for(int i=a;i<=b;i++)

const ll mod = 1000000007;
const ll inf = LLONG_MAX;
const ll ninf = LLONG_MIN;
const ld eps = 1e-10;
const ll N = 1000005;
const ll LOGN = log2(N);
ll n, m;
bool g[505][505];
ll d[505];
ll vis[505];
char ans[505];
void dfsa(ll u)
{
    vis[u] = 1;
    ans[u] = 'a';
    f(j, n)
    {
        if(!vis[j] && g[u][j] && ans[j] == '.')
        {
            dfsa(j);
        }
    }
}
void dfsc(ll u)
{
    vis[u] = 1;
    ans[u] = 'c';
    f(j, n)
    {
        if(!vis[j] && g[u][j] && ans[j] == '.')
        {
            dfsc(j);
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin >> n >> m;
    f(i, m)
    {
        ll u, v;
        cin >> u >> v;
        u--;
        v--;
        g[u][v] = 1;
        g[v][u] = 1;
        d[u]++;
        d[v]++;
    }
    f(i, n)
    {
        ans[i] = '.';
    }
    f(i, n)
    {
        if(d[i] == n - 1)
        {
            ans[i] = 'b';
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            dfsa(i);
            break;
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            dfsc(i);
            break;
        }
    }
    f(i, n)
    {
        if(ans[i] == 'a')
        {
            f(j, n)
            {
                if(i != j && (ans[j] == 'a' || ans[j] == 'b') && !g[i][j])
                {
                    cout << "No\n";
                    return 0;
                }
            }
        }
    }
    f(i, n)
    {
        if(ans[i] == 'c')
        {
            f(j, n)
            {
                if(i != j && (ans[j] == 'c' || ans[j] == 'b') && !g[i][j])
                {
                    cout << "No\n";
                    return 0;
                }
            }
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            cout << "No\n";
            return 0;
        }
    }
    cout << "Yes\n";
    f(i, n)
    {
        cout << ans[i];
    }
    cout << "\n";
    return 0;
}


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

typedef long long ll;
typedef double ld;
typedef pair<ll,ll> pl;

#define sl(x) scanf("%lld",&x)
#define pl(x) printf("%lld\n",x);
#define sf(x) sort(x.begin(),x.end(),func)
#define s(x) sort(x.begin(),x.end())
#define pb push_back
#define all(v) v.begin(),v.end()
#define rs(v) { s(v) ; r(v) ; }
#define r(v) {reverse(all(v));}
#define mp make_pair
#define F first
#define S second
#define f(i,n) for(int i=0;i<n;i++)
#define fab(i,a,b) for(int i=a;i<=b;i++)

const ll mod = 1000000007;
const ll inf = LLONG_MAX;
const ll ninf = LLONG_MIN;
const ld eps = 1e-10;
const ll N = 1000005;
const ll LOGN = log2(N);
ll n,m;
ll g[1001][1001];
ll v[1001];
bool done[1001];
ll f = 1;
void check(ll x)
{
    f(i,n)
    {
        if(v[i]==x)
        {
            f(j,n)
            {
                if(v[j]==x && g[i][j]==0)
                {
                    f = 0;
                    break;
                }
            }
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin >> n >> m;
    f(i,m)
    {
        ll x,y;
        cin >> x >> y;
        x--;
        y--;
        g[x][y] = 1;
        g[y][x] = 1;
    }
    char s[n];
    ll st = -1;
    f(i,n)
    {
        g[i][i] = 1;
        for(ll j=i+1;j<n;j++)
        {
            if(g[i][j]==0)
            {
                st = i;
                break;
            }
        }
    }
    queue < ll > q;
    v[st] = 1;
    q.push(st);
    while(!q.empty())
    {
        ll u = q.front();
        q.pop();
        ll t = 1 + v[u]%2;
        f(i,n)
        {
            if(i!=u && g[u][i]==0)
            {
                if(v[i]==0)
                {
                    q.push(i);
                    v[i] = t;
                }
                else if(v[i]!=t)
                {
                    f = 0;
                    break;
                }
            }
        }
    }

    f(i,n)
    {
        if(v[i]==0)
        {
            s[i] = 'b';
        }
        else if(v[i]==1)
        {
            s[i] = 'c';
        }
        else
        {
            s[i] = 'a';
        }
    }
    f(i,n)
    {
        f(j,n)
        {
            if(g[i][j]==0 && v[i]==0)
            {
                f = 0;
                break;
            }
        }
    }
    check(1);
    check(2);
    if(f==0)
    {
        cout << "No\n";
        return 0;
    }
    cout << "Yes\n";
    f(i,n)
    {
        cout << s[i];
    }
    cout << "\n";
    return 0;
}


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

typedef long long ll;
typedef double ld;
typedef pair<ll,ll> pl;

#define sl(x) scanf("%lld",&x)
#define pl(x) printf("%lld\n",x);
#define sf(x) sort(x.begin(),x.end(),func)
#define s(x) sort(x.begin(),x.end())
#define pb push_back
#define all(v) v.begin(),v.end()
#define rs(v) { s(v) ; r(v) ; }
#define r(v) {reverse(all(v));}
#define mp make_pair
#define F first
#define S second
#define f(i,n) for(int i=0;i<n;i++)
#define fab(i,a,b) for(int i=a;i<=b;i++)

const ll mod = 1000000007;
const ll inf = LLONG_MAX;
const ll ninf = LLONG_MIN;
const ld eps = 1e-10;
const ll N = 1000005;
const ll LOGN = log2(N);
ll n, m;
bool g[505][505];
ll d[505];
char ans[505];
void dfsa(ll u)
{
    ans[u] = 'a';
    f(j, n)
    {
        if(g[u][j] && ans[j] == '.')
        {
            dfsa(j);
        }
    }
}
void dfsc(ll u)
{
    ans[u] = 'c';
    f(j, n)
    {
        if(g[u][j] && ans[j] == '.')
        {
            dfsc(j);
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin >> n >> m;
    f(i, m)
    {
        ll u, v;
        cin >> u >> v;
        u--;
        v--;
        g[u][v] = 1;
        g[v][u] = 1;
        d[u]++;
        d[v]++;
    }
    f(i, n)
    {
        ans[i] = '.';
    }
    f(i, n)
    {
        if(d[i] == n - 1)
        {
            ans[i] = 'b';
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            dfsa(i);
            break;
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            dfsc(i);
            break;
        }
    }
    f(i, n)
    {
        if(ans[i] == 'a')
        {
            f(j, n)
            {
                if(i != j && (ans[j] == 'a' || ans[j] == 'b') && !g[i][j])
                {
                    cout << "No\n";
                    return 0;
                }
            }
        }
    }
    f(i, n)
    {
        if(ans[i] == 'c')
        {
            f(j, n)
            {
                if(i != j && (ans[j] == 'c' || ans[j] == 'b') && !g[i][j])
                {
                    cout << "No\n";
                    return 0;
                }
            }
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            cout << "No\n";
            return 0;
        }
    }
    cout << "Yes\n";
    f(i, n)
    {
        cout << ans[i];
    }
    cout << "\n";
    return 0;
}


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

typedef long long ll;
typedef double ld;
typedef pair<ll,ll> pl;

#define sl(x) scanf("%lld",&x)
#define pl(x) printf("%lld\n",x);
#define sf(x) sort(x.begin(),x.end(),func)
#define s(x) sort(x.begin(),x.end())
#define pb push_back
#define all(v) v.begin(),v.end()
#define rs(v) { s(v) ; r(v) ; }
#define r(v) {reverse(all(v));}
#define mp make_pair
#define F first
#define S second
#define f(i,n) for(int i=0;i<n;i++)
#define fab(i,a,b) for(int i=a;i<=b;i++)

const ll mod = 1000000007;
const ll inf = LLONG_MAX;
const ll ninf = LLONG_MIN;
const ld eps = 1e-10;
const ll N = 1000005;
const ll LOGN = log2(N);
ll n, m;
bool g[505][505];
ll d[505];
int main()
{
    ios_base::sync_with_stdio(0);
    cin >> n >> m;
    f(i, m)
    {
        ll u, v;
        cin >> u >> v;
        u--;
        v--;
        g[u][v] = 1;
        g[v][u] = 1;
        d[u]++;
        d[v]++;
    }
    char ans[n];
    f(i, n)
    {
        ans[i] = '.';
    }
    f(i, n)
    {
        if(d[i] == n - 1)
        {
            ans[i] = 'b';
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            ans[i] = 'a';
            f(j, n)
            {
                if(i != j && g[i][j] && ans[j] == '.')
                {
                    ans[j] = 'a';
                }
            }
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            ans[i] = 'c';
            f(j, n)
            {
                if(i != j && g[i][j] && ans[j] == '.')
                {
                    ans[j] = 'c';
                }
            }
        }
    }
    f(i, n)
    {
        if(ans[i] == 'a')
        {
            f(j, n)
            {
                if((ans[j] == 'a' || ans[j] == 'b') && !g[i][j])
                {
                    cout << "No\n";
                    return 0;
                }
            }
        }
    }
    f(i, n)
    {
        if(ans[i] == 'c')
        {
            f(j, n)
            {
                if((ans[j] == 'c' || ans[j] == 'b') && !g[i][j])
                {
                    cout << "No\n";
                    return 0;
                }
            }
        }
    }
    f(i, n)
    {
        if(ans[i] == '.')
        {
            cout << "No\n";
            return 0;
        }
    }
    cout << "Yes\n";
    f(i, n)
    {
        cout << ans[i];
    }
    cout << "\n";
    return 0;
}


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

typedef long long ll;
typedef double ld;
typedef pair<ll,ll> pl;

#define sl(x) scanf("%lld",&x)
#define pl(x) printf("%lld\n",x);
#define sf(x) sort(x.begin(),x.end(),func)
#define s(x) sort(x.begin(),x.end())
#define pb push_back
#define all(v) v.begin(),v.end()
#define rs(v) { s(v) ; r(v) ; }
#define r(v) {reverse(all(v));}
#define mp make_pair
#define F first
#define S second
#define f(i,n) for(int i=0;i<n;i++)
#define fab(i,a,b) for(int i=a;i<=b;i++)

const ll mod = 1000000007;
const ll inf = LLONG_MAX;
const ll ninf = LLONG_MIN;
const ld eps = 1e-10;
const ll N = 1000005;
const ll LOGN = log2(N);
ll n,m;
ll g[1001][1001];
ll v[1001];
bool done[1001];
int main()
{
    ios_base::sync_with_stdio(0);
    cin >> n >> m;
    f(i,m)
    {
        ll x,y;
        cin >> x >> y;
        x--;
        y--;
        g[x][y] = 1;
        g[y][x] = 1;
        g[x][x] = 1;
        g[y][y] = 1;
    }
    char s[n];
    ll st ;
    f(i,n)
    {
        for(ll j=i+1;j<n;j++)
        {
            if(g[i][j]==0)
            {
                st = i;
                break;
            }
        }
    }
    queue < ll > q;
    v[st] = 1;
    q.push(st);
    ll f = 1;
    while(!q.empty())
    {
        ll u = q.front();
        q.pop();
        ll t = 1 + v[u]%2;
        f(i,n)
        {
            if(i==u) continue;
            if(g[u][i]==0)
            {
                if(v[i]==0)
                {
                    q.push(i);
                    v[i] = t;
                }
                else if(v[i]!=t)
                {
                    f = 0;
                    break;
                }
            }
        }
    }

    f(i,n)
    {
        if(v[i]==0)
        {
            s[i] = 'b';
        }
        else if(v[i]==1)
        {
            s[i] = 'c';
        }
        else
        {
            s[i] = 'a';
        }
    }
    f(i,n)
    {
        f(j,n)
        {
            if(g[i][j]==0 && v[i]==0)
            {
                f = 0;
                break;
            }
        }
    }
    f(i,n)
    {
        if(v[i]==1)
        {
            f(j,n)
            {
                if(v[j]==1 && g[i][j]==0)
                {
                    f = 0;
                    break;
                }
            }
        }
    }
    f(i,n)
    {
        if(v[i]==2)
        {
            f(j,n)
            {
                if(v[j]==2 && g[i][j]==0)
                {
                    f = 0;
                    break;
                }
            }
        }
    }
    if(f==0)
    {
        cout << "No\n";
        return 0;
    }
    cout << "Yes\n";
    f(i,n)
    {
        cout << s[i];
    }
    cout << "\n";
    return 0;
}


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

vector<int> graph[MAX];
bool grid[MAX][MAX]={0};
char ch[MAX];

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,m,x,y;
	cin>>n>>m;
	for(int i=0; i<m; i++)
	{
		cin>>x>>y;
		graph[x].push_back(y);
		graph[y].push_back(x);
		grid[x][y]=grid[y][x]=1;
	}

	for(int i=1; i<=n; i++)
	ch[i]='x';

	for(int i=1; i<=n; i++)
	{
		if(graph[i].size() == n-1) ch[i]='b';
	}

	bool flag=0;
	for(int i=1; i<=n; i++)
	{
		if(ch[i]=='x') {
			ch[i]='a';
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(grid[i][j]) {
					if(ch[i]=='x') ch[i]='a';
					else if(ch[i]=='c') {
						flag=1;
						break;
					}
				}
				else if(ch[i]=='b' || ch[i]=='a') flag=1;
				else ch[i]='c';
				if(flag) break;
			}
		}
		if(flag) break;
	}
	if(flag) cout<<"No"<<endl;
	else {
		for(int i=2; i<=n-1; i++)
		{
			if(abs(ch[i]-ch[i-1])==2) {
				if(grid[i][i-1]) {
					flag=1;
					break;
				}
			}
			else if(abs(ch[i]-ch[i+1])==2) {
				if(grid[i][i+1]) {
					flag=1;
					break;
				}
			}
			else if(abs(ch[i]-ch[i-1])==1) {
				if(!grid[i][i-1]) {
					flag=1;
					break;
				}
			}
			else if(abs(ch[i]-ch[i+1])==1) {
				if(!grid[i][i+1]) {
					flag=1;
					break;
				}
			}
		}
		if(flag) cout<<"No"<<endl;
		else {
			cout<<"Yes"<<endl;
			for(int i=1; i<=n; i++)
			cout<<ch[i];
			cout<<endl;
		}
	}
}


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

vector<int> graph[MAX];
bool grid[MAX][MAX]={0};
char ch[MAX];

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,m,x,y;
	cin>>n>>m;
	for(int i=0; i<m; i++)
	{
		cin>>x>>y;
		graph[x].push_back(y);
		graph[y].push_back(x);
		grid[x][y]=grid[y][x]=1;
	}

	for(int i=1; i<=n; i++)
	ch[i]='x';

	for(int i=1; i<=n; i++)
	{
		if(graph[i].size() == n-1) ch[i]='b';
	}

	bool flag=0;
	for(int i=2; i<=n; i++)
	{
		if(ch[i]=='x' && graph[i].size()!=0) {
			ch[i]='a';
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(grid[i][j]) {
					if(ch[j]=='x') ch[j]='a';
					else if(ch[j]=='c') {
						flag=1;
						//cout<<" "<<j<<endl;
						break;
					}
				}
				else if(ch[j]=='b' || ch[j]=='a') flag=1;//cout<<" "<<i<<" "<<ch[j]<<endl;
				else ch[j]='c';
				if(flag) break;
			}
		}
		if(flag) break;
	}
	if(flag) cout<<"No"<<endl;
	else {
		for(int i=1; i<=n; i++)
		{
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(abs(ch[i]-ch[j])==1 || abs(ch[i]-ch[j])==0) {
					if(!grid[i][j]) {
						flag=1;
						break;
					}
				}
				else if(grid[i][j]) {
					flag=1;
					break;
				}
				if(flag) break;
			}
			if(flag) break;
		}

		if(flag) cout<<"No"<<endl;
		else {
			cout<<"Yes"<<endl;
			for(int i=1; i<=n; i++)
			cout<<ch[i];
			cout<<endl;
		}
	}
}


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

vector<int> graph[MAX];
bool grid[MAX][MAX]={0};
char ch[MAX];

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,m,x,y;
	cin>>n>>m;
	for(int i=0; i<m; i++)
	{
		cin>>x>>y;
		graph[x].push_back(y);
		graph[y].push_back(x);
		grid[x][y]=grid[y][x]=1;
	}

	if(m==0) {
		if(n>2) {
			cout<<"No"<<endl;
			return 0;
		}
		cout<<"Yes"<<endl;
		for(int i=1; i<=n; i++)
		{
			if(i&1) cout<<"a";
			else cout<<"c";
		}
		cout<<endl;
		return 0;
	}

	for(int i=1; i<=n; i++)
	ch[i]='x';

	for(int i=1; i<=n; i++)
	{
		if(graph[i].size() == n-1) ch[i]='b';
	}

	bool flag=0;
	for(int i=2; i<=n; i++)
	{
		if(ch[i]=='x' && graph[i].size()!=0) {
			ch[i]='a';
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(grid[i][j]) {
					if(ch[j]=='x') ch[j]='a';
					else if(ch[j]=='c') {
						flag=1;
						//cout<<" "<<j<<endl;
						break;
					}
				}
				else if(ch[j]=='b' || ch[j]=='a') flag=1;//cout<<" "<<i<<" "<<ch[j]<<endl;
				else ch[j]='c';
				if(flag) break;
			}
		}
		if(flag) break;
	}
	if(flag) cout<<"No"<<endl;
	else {
		for(int i=1; i<=n; i++)
		{
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(abs(ch[i]-ch[j])==1 || abs(ch[i]-ch[j])==0) {
					if(!grid[i][j]) {
						flag=1;
						break;
					}
				}
				else if(grid[i][j]) {
					flag=1;
					break;
				}
				if(flag) break;
			}
			if(flag) break;
		}

		if(flag) cout<<"No"<<endl;
		else {
			cout<<"Yes"<<endl;
			for(int i=1; i<=n; i++)
			cout<<ch[i];
			cout<<endl;
		}
	}
}


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

vector<int> graph[MAX];
bool grid[MAX][MAX]={0};
char ch[MAX];

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,m,x,y;
	cin>>n>>m;
	for(int i=0; i<m; i++)
	{
		cin>>x>>y;
		graph[x].push_back(y);
		graph[y].push_back(x);
		grid[x][y]=grid[y][x]=1;
	}

	for(int i=1; i<=n; i++)
	ch[i]='x';

	for(int i=1; i<=n; i++)
	{
		if(graph[i].size() == n-1) ch[i]='b';
	}

	bool flag=0;
	for(int i=2; i<=n; i++)
	{
		if(ch[i]=='x' && graph[i].size()!=0) {
			ch[i]='a';
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(grid[i][j]) {
					if(ch[j]=='x') ch[i]='a';
					else if(ch[j]=='c') {
						flag=1;
						//cout<<" "<<j<<endl;
						break;
					}
				}
				else if(ch[j]=='b' || ch[j]=='a') flag=1;//cout<<" "<<i<<" "<<ch[j]<<endl;
				else ch[j]='c';
				if(flag) break;
			}
		}
		if(flag) break;
	}
	if(flag) cout<<"No"<<endl;
	else {
		for(int i=2; i<=n-1; i++)
		{
			if(abs(ch[i]-ch[i-1])==2) {
				if(grid[i][i-1]) {
					flag=1;
					//cout<<" "<<i<<"empty before"<<endl;
					break;
				}
			}
			else if(abs(ch[i]-ch[i+1])==2) {
				if(grid[i][i+1]) {
					flag=1;
					//cout<<" "<<i<<"empty after"<<endl;
					break;
				}
			}
			else if(abs(ch[i]-ch[i-1])==1) {
				if(!grid[i][i-1]) {
					flag=1;
					//cout<<" "<<i<<"filled before"<<endl;
					break;
				}
			}
			else if(abs(ch[i]-ch[i+1])==1) {
				if(!grid[i][i+1]) {
					flag=1;
					//cout<<" "<<i<<"filled after"<<endl;
					break;
				}
			}
			if(flag) break;
		}
		if(flag) cout<<"No"<<endl;
		else {
			cout<<"Yes"<<endl;
			for(int i=1; i<=n; i++)
			cout<<ch[i];
			cout<<endl;
		}
	}
}


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

vector<int> graph[MAX];
bool grid[MAX][MAX]={0};
char ch[MAX];

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,m,x,y;
	cin>>n>>m;
	for(int i=0; i<m; i++)
	{
		cin>>x>>y;
		graph[x].push_back(y);
		graph[y].push_back(x);
		grid[x][y]=grid[y][x]=1;
	}

	if(m==0) {
		cout<<"Yes"<<endl;
		for(int i=1; i<=n; i++)
		{
			if(i&1) cout<<"a";
			else cout<<"c";
		}
		cout<<endl;
		return 0;
	}

	for(int i=1; i<=n; i++)
	ch[i]='x';

	for(int i=1; i<=n; i++)
	{
		if(graph[i].size() == n-1) ch[i]='b';
	}

	bool flag=0;
	for(int i=2; i<=n; i++)
	{
		if(ch[i]=='x' && graph[i].size()!=0) {
			ch[i]='a';
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(grid[i][j]) {
					if(ch[j]=='x') ch[j]='a';
					else if(ch[j]=='c') {
						flag=1;
						//cout<<" "<<j<<endl;
						break;
					}
				}
				else if(ch[j]=='b' || ch[j]=='a') flag=1;//cout<<" "<<i<<" "<<ch[j]<<endl;
				else ch[j]='c';
				if(flag) break;
			}
		}
		if(flag) break;
	}
	if(flag) cout<<"No"<<endl;
	else {
		for(int i=1; i<=n; i++)
		{
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(abs(ch[i]-ch[j])==1 || abs(ch[i]-ch[j])==0) {
					if(!grid[i][j]) {
						flag=1;
						break;
					}
				}
				else if(grid[i][j]) {
					flag=1;
					break;
				}
				if(flag) break;
			}
			if(flag) break;
		}

		if(flag) cout<<"No"<<endl;
		else {
			cout<<"Yes"<<endl;
			for(int i=1; i<=n; i++)
			cout<<ch[i];
			cout<<endl;
		}
	}
}


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

vector<int> graph[MAX];
bool grid[MAX][MAX]={0};
char ch[MAX];

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,m,x,y;
	cin>>n>>m;
	for(int i=0; i<m; i++)
	{
		cin>>x>>y;
		graph[x].push_back(y);
		graph[y].push_back(x);
		grid[x][y]=grid[y][x]=1;
	}

	if(m==0) {
		for(int i=1; i<=n; i++)
		{
			if(i&1) cout<<"a";
			else cout<<"c";
		}
		cout<<endl;
		return 0;
	}

	for(int i=1; i<=n; i++)
	ch[i]='x';

	for(int i=1; i<=n; i++)
	{
		if(graph[i].size() == n-1) ch[i]='b';
	}

	bool flag=0;
	for(int i=2; i<=n; i++)
	{
		if(ch[i]=='x' && graph[i].size()!=0) {
			ch[i]='a';
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(grid[i][j]) {
					if(ch[j]=='x') ch[j]='a';
					else if(ch[j]=='c') {
						flag=1;
						//cout<<" "<<j<<endl;
						break;
					}
				}
				else if(ch[j]=='b' || ch[j]=='a') flag=1;//cout<<" "<<i<<" "<<ch[j]<<endl;
				else ch[j]='c';
				if(flag) break;
			}
		}
		if(flag) break;
	}
	if(flag) cout<<"No"<<endl;
	else {
		for(int i=1; i<=n; i++)
		{
			for(int j=1; j<=n; j++)
			{
				if(j==i) continue;
				if(abs(ch[i]-ch[j])==1 || abs(ch[i]-ch[j])==0) {
					if(!grid[i][j]) {
						flag=1;
						break;
					}
				}
				else if(grid[i][j]) {
					flag=1;
					break;
				}
				if(flag) break;
			}
			if(flag) break;
		}

		if(flag) cout<<"No"<<endl;
		else {
			cout<<"Yes"<<endl;
			for(int i=1; i<=n; i++)
			cout<<ch[i];
			cout<<endl;
		}
	}
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <queue>

using namespace std;

#define int long long

const int M = 500 + 10;//Maximum number of vertices
bool g[M][M];
int color[M];//!

main()
{
	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--;
		v--;
		g[u][v] = g[v][u] = true;
	}

	for (int i = 0; i < n; i ++)
		for (int j = 0; j < n; j++)
			for (int k = 0; k < n; k++)
				if (i != j  &&  i != k  &&  j != k)
					if (g[i][j] == true  &&  g[i][k] == true  &&  g[j][k] == false)
					{
						if (color[i] == 1  ||  color[i] == 3)
						{
							cout << "No" << endl;
							return 0;
						}
						color[i] = 2;
						if (color[j] == 2  ||  color[k] == 2)
						{
							cout << "No" << endl;
							return 0;
						}
						if (color[j] == color[k]  &&  color[j] > 0)
						{
							cout << "No" << endl;
							return 0;
						}
						if (color[j] == 0  &&  color[k] == 0)
						{
							color[j] = 1;
							color[k] = 3;
						}
						else if (color[j])
							color[k] = 4 - color[j];
						else
							color[j] = 4 - color[k];
					}

	for(int i = 0; i < n; i++)
		if(color[i] == 0)
		{
			color[i] = 1;
			bool q[4];
			for(int j = 0; j < n; j++)
				if(i != j  &&  g[i][j] != true)
					q[color[j]] = true;
			if(q[1] == true)
				color[i] = 3;
		}
	for (int i = 0; i < n; i++)
		for (int j = 0; j < n; j++)
			if (i != j)
			{
				if (color[i] == 2  ||  color[j] == 2)
				{
					if (g[i][j] != true)
					{
						cout << "No" << endl;
						return 0;
					}
				}
				else if (color[i] + color[j] == 4  &&  g[i][j] == true)
				{
					cout << "No" << endl;
					return 0;
				}
			}

	cout << "Yes" << endl;
	for(int i = 0; i < n; i++)
		cout << char('a' + color[i] - 1);
	cout << endl;

	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <queue>

using namespace std;

#define int long long

const int M = 500 + 10;//Maximum number of vertices
int n, m;
vector <int> adj[M];
bool g[M][M];
int color[M];//1 for a, 2 for b, 3 for c

main()
{
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--;
		v--;
		g[u][v] = g[v][u] = true;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for (int i = 0; i < n; i++)
		if (adj[i].size() == n - 1)//if it was connected to all the other vertices
			color[i] = 2;

	for (int i = 0; i < n; i++)
		if (color[i] != 2)
		{
			if (color[i] == 0)
				color[i] = 1;
			for (int j = 0; j < n; j++)
				if (i != j)
				{
					if (color[j] == 0)
					{
						if (g[i][j] == true)
							color[j] = color[i];
						else
							color[j] = 4 - color[i];
					}
					else
					{
						if (g[i][j] == true)
						{
							if (color[j] == 4 - color[i])
							{
								cout << "No" << endl;
								return 0;
							}
						}
						else
							if (color[j] == color[i])
							{
								cout << "No" << endl;
								return 0;
							}
					}
				}
		}

	cout << "Yes" << endl;
	for(int i = 0; i < n; i++)
		cout << char('a' + color[i] - 1);
	cout << endl;

	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <queue>

using namespace std;

#define int long long

const int M = 500 + 10;//Maximum number of vertices
bool g[M][M];
int color[M];//!

main()
{
	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--;
		v--;
		g[u][v] = g[v][u] = true;
	}

	for (int i = 0; i < n; i ++)
		for (int j = 0; j < n; j++)
			for (int k = 0; k < n; k++)
				if (i != j  &&  i != k  &&  j != k)
					if (g[i][j] == true  &&  g[i][k] == true  &&  g[j][k] == false)
					{
						if (color[i] == 1  ||  color[i] == 3)
						{
							cout << "No" << endl;
							return 0;
						}
						color[i] = 2;
						if (color[j] == 2  ||  color[k] == 2)
						{
							cout << "No" << endl;
							return 0;
						}
						if (color[j] == color[k]  &&  color[j] > 0)
						{
							cout << "No" << endl;
							return 0;
						}
						if (color[j] == 0  &&  color[k] == 0)
						{
							color[j] = 1;
							color[k] = 3;
						}
						else if (color[j])
							color[k] = 4 - color[j];
						else
							color[j] = 4 - color[k];
					}

	for(int i = 0; i < n; i ++)
		if(color[i] == 0)
			color[i] = 2;

	for (int i = 0; i < n; i++)
		for (int j = 0; j < n; j++)
			if (i != j)
			{
				if (color[i] == 2  ||  color[j] == 2)
				{
					if (g[i][j] != true)
					{
						cout << "No" << endl;
						return 0;
					}
				}
				else if (color[i] + color[j] == 4  &&  g[i][j] == true)
				{
					cout << "No" << endl;
					return 0;
				}
			}

	cout << "Yes" << endl;
	for(int i = 0; i < n; i++)
		cout << char('a' + color[i] - 1);
	cout << endl;

	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <queue>

using namespace std;

#define int long long

const int M = 500 + 10;//Maximum number of vertices
int n, m;
vector <int> adj[M];
bool g[M][M];
int color[M];//1 for a, 2 for b, 3 for c

main()
{
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--;
		v--;
		g[u][v] = g[v][u] = true;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for (int i = 0; i < n; i++)
		if (adj[i].size() == n - 1)//if it was connected to all the other vertices
			color[i] = 2;

	for (int i = 0; i < n; i++)
		if (color[i] != 2)
		{
			if (color[i] == 0)
				color[i] = 1;
			for (int j = 0; j < n; j++)
				if (i != j)
				{
					if (color[j] == 0)
					{
						if (g[i][j] == true)
							color[j] = color[i];
						else
							color[j] = 4 - color[i];
					}
					else
					{
						if (g[i][j] == true)
						{
							if (color[j] == 4 - color[i])
							{
								cout << "No" << endl;
								return 0;
							}
						}
						else
							if (color[j] == color[i])
							{
								cout << "No" << endl;
								return 0;
							}
					}
				}
		}

	cout << "Yes" << endl;
	for(int i = 0; i < n; i++)
		cout << char('a' + color[i]);
	cout << endl;

	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <queue>

using namespace std;

#define int long long

const int M = 500 + 10;//Maximum number of vertices
int n, m;
vector <int> adj[M];
bool g[M][M];
int color[M];//1 for a, 2 for b, 3 for c

main()
{
	ios_base::sync_with_stdio(false);

	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--;
		v--;
		g[u][v] = g[v][u] = true;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for (int i = 0; i < n; i++)
		if (adj[i].size() == n - 1)//if it was connected to all the other vertices
			color[i] = 2;

	for (int i = 0; i < n; i++)
		if (color[i] != 2)
		{
			if (color[i] == 0)
				color[i] = 1;
			for (int j = 0; j < n; j++)
				if (i != j)
				{
					if (color[j] == 0)
					{
						if (g[i][j] == true)
							color[j] = color[i];
						else
							color[j] = 4 - color[i];
					}
					else
					{
						if (g[i][j] == true)
						{
							if (color[j] == 4 - color[i])
							{
								cout << "No" << endl;
								return 0;
							}
						}
						else
							if (color[j] == color[i])
							{
								cout << "No" << endl;
								return 0;
							}
					}
				}
		}

	cout << "Yes" << endl;
	for(int i = 0; i < n; i++)
		cout << char('a' + color[i] - 1);
	cout << endl;

	return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
#define MOD 1000000007

using namespace std;

int graph[505][505],visited[505];
vector<int> adj[505];
void dfs(int i)
{
    visited[i]=1;
    for(int j=0;j<adj[i].size();j++)
    {
        if(!visited[adj[i][j]])
            dfs(adj[i][j]);
    }
}

int main()
{
    int n,m;
    cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        int u,v;
        cin>>u>>v;
        adj[u].push_back(v);
        adj[v].push_back(u);
        graph[u][v]=1;
        graph[v][u]=1;
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=i+1;j<=n;j++)
        {
            if(!graph[i][j]){
                for(int k=j+1;k<=n;k++)
                {
                    if(!graph[i][k]){
                        if(!graph[j][k])
                        {
                            //cout<<j<<" "<<k;
                            cout<<"No";
                            return 0;
                        }
                    }
                }
            }
        }
    }
    cout<<"Yes\n";
    dfs(1);
    for(int i=1;i<=n;i++)
    {
        if(visited[i])
            cout<<"a";
        else
            cout<<"c";
    }
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
#define MOD 1000000007

using namespace std;

int graph[505][505];
int main()
{
    int n,m;
    cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        int u,v;
        cin>>u>>v;
        graph[u][v]=1;
        graph[v][u]=1;
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=i+1;j<=n;j++)
        {
            if(!graph[i][j]){
                for(int k=j+1;k<=n;k++)
                {
                    if(!graph[i][k]){
                        if(!graph[j][k])
                        {
                            cout<<"No";
                            return 0;
                        }
                    }
                }
            }
        }
    }
    cout<<"Yes\n";
    for(int i=0;i<n;i++)
        cout<<"a";
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
#define MOD 1000000007

using namespace std;

int graph[505][505],visited[505];
//vector<int> adj[505];
char ans[505];
/*void dfs(int i)
{
    visited[i]=1;
    for(int j=0;j<adj[i].size();j++)
    {
        if(!visited[adj[i][j]])
            dfs(adj[i][j]);
    }
}*/

int main()
{
    int n,m;
    cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        int u,v;
        cin>>u>>v;
        //adj[u].push_back(v);
        //adj[v].push_back(u);
        graph[u][v]=1;
        graph[v][u]=1;
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=i+1;j<=n;j++)
        {
            if(!graph[i][j]){
                for(int k=j+1;k<=n;k++)
                {
                    if(!graph[i][k]){
                        if(!graph[j][k])
                        {
                            //cout<<j<<" "<<k;
                            cout<<"No";
                            return 0;
                        }
                    }
                }
            }
        }
    }
    cout<<"Yes\n";
    /*dfs(1);
    for(int i=1;i<=n;i++)
    {
        if(visited[i])
            cout<<"a";
        else
            cout<<"c";
    }*/
    for(int i=1;i<=n;i++)
    {
        for(int j=i+1;j<=n;j++)
        {
            if(!graph[i][j])
            {
                ans[i]='a';
                ans[j]='c';
            }
        }
    }
    for(int i=1;i<=n;i++)
    {
        if(ans[i]!='a'&&ans[i]!='c')
            cout<<"b";
        else
            cout<<ans[i];
    }
    return 0;
}