#include<bits/stdc++.h>
using namespace std;
int main()
{
    string a,b,c,d;
    cin >> a >> b;
    int l=a.size();
    int l2=b.size();
    int x = 0, y = 0;
    while(a[x] == '0')
        ++x;
    while(b[y] == '0')
        ++y;
    c = a.substr(x);
    d = b.substr(y);
    if(c.size() > d.size())
    {
        cout << ">"<<endl; return 0;
    }
    if(c.size() < d.size())
    {
        cout << "<"<<endl; return 0;
    }
    if(c == d)
        cout << "="<<endl;
    else if(c > d)
        cout << ">"<<endl;
    else
        cout << "<"<<endl;

    return 0;
}


	#include<bits/stdc++.h>
using namespace std;
#define ll           long long
#define rep(i,j,n)   for(ll i=j;i<n;i++)
#define scn(a)       scanf("%lld",&a)
#define nl           printf("\n")
#define nl           printf("\n")
#define scns(a,b)    scanf("%lld %lld",&a,&b)
#define print(a)     printf("%lld",a)
#define tc           ll t; scn(t); while(t--)
#define vec          vector<ll>
#define pb           push_back
#define pairs        pair<ll,ll>
#define f            first
#define s            second
#define all(v)       v.begin(),v.end()
#define srt(v)       sort(v.rbegin(),v.rend())
#define mem(a,b)     memset(a,b,sizeof(a))
#define im           int main()
#define maxx         500005
#define inf          LLONG_MAX
#define zer          LLONG_MIN
#define mp           make_pair
	im{
	    string a,b;
	}
	cin >> a >> b;
	if (a.size() < b.size()) a = string(b.size() - a.size(), '0') + a;
	else if (a.size() > b.size()) b = string(a.size() - b.size(), '0') + b;
	if (a < b) printf("<\n");
	else if (a > b) printf(">\n");
	else printf("=\n");
	return 0;}


	#include<bits/stdc++.h>
using namespace std;
#define ll           long long
#define rep(i,j,n)   for(ll i=j;i<n;i++)
#define scn(a)       scanf("%lld",&a)
#define nl           printf("\n")
#define nl           printf("\n")
#define scns(a,b)    scanf("%lld %lld",&a,&b)
#define print(a)     printf("%lld",a)
#define tc           ll t; scn(t); while(t--)
#define vec          vector<ll>
#define pb           push_back
#define pairs        pair<ll,ll>
#define f            first
#define s            second
#define all(v)       v.begin(),v.end()
#define srt(v)       sort(v.rbegin(),v.rend())
#define mem(a,b)     memset(a,b,sizeof(a))
#define im           int main()
#define maxx         500005
#define inf          LLONG_MAX
#define zer          LLONG_MIN
#define mp           make_pair
	im{
	    string a,b;

	cin>>a>>b;
	if (a.size() < b.size()) a = string(b.size() - a.size(), '0') + a;
	else if (a.size() > b.size()) b = string(a.size() - b.size(), '0') + b;
	if (a < b) printf("<\n");
	else if (a > b) printf(">\n");
	else printf("=\n");
	return 0;}


#include<bits/stdc++.h>
using namespace std;
#define ll           long long
#define rep(i,j,n)   for(ll i=j;i<n;i++)
#define scn(a)       scanf("%lld",&a)
#define nl           printf("\n")
#define nl           printf("\n")
#define scns(a,b)    scanf("%lld %lld",&a,&b)
#define print(a)     printf("%lld",a)
#define tc           ll t; scn(t); while(t--)
#define vec          vector<ll>
#define pb           push_back
#define pairs        pair<ll,ll>
#define f            first
#define s            second
#define all(v)       v.begin(),v.end()
#define srt(v)       sort(v.rbegin(),v.rend())
#define mem(a,b)     memset(a,b,sizeof(a))
#define im           int main()
#define maxx         500005
#define inf          LLONG_MAX
#define zer          LLONG_MIN
#define mp           make_pair
ll md=1;
unordered_map<ll,ll>freq;
im
{
string a,b;
cin>>a>>b;
ll al,bl,sa,sb;
ll n=0
rep(i,0,(ll)a.length())
{

    if(a[i]==0)
    {
        al=a.length()--;
    }
    else
    {
        sa=a[i]-'0';

        break;
    }
}
rep(i,0,(ll)b.length())
{
    if(b[i]==0)
    {
        bl=b.length()--;
    }
    else
    {
        sb=b[i]-'0';

        break;
    }
}
if(al>bl)
{
    cout<<">";
}
else if(al<bl)
{
    cout<<"<";
}
else if(al==bl)
{
    if(sa>sb)
    cout<<">";
    else if(sa<sb)
    {
        cout<<"<";
    }
    else if(sa==sb)
    {
        cout<<"=";
    }
}

}


#include<bits/stdc++.h>
using namespace std;
#define ll           long long
#define rep(i,j,n)   for(ll i=j;i<n;i++)
#define scn(a)       scanf("%lld",&a)
#define nl           printf("\n")
#define nl           printf("\n")
#define scns(a,b)    scanf("%lld %lld",&a,&b)
#define print(a)     printf("%lld",a)
#define tc           ll t; scn(t); while(t--)
#define vec          vector<ll>
#define pb           push_back
#define pairs        pair<ll,ll>
#define f            first
#define s            second
#define all(v)       v.begin(),v.end()
#define srt(v)       sort(v.rbegin(),v.rend())
#define mem(a,b)     memset(a,b,sizeof(a))
#define im           int main()
#define maxx         500005
#define inf          LLONG_MAX
#define zer          LLONG_MIN
#define mp           make_pair
ll md=1;
im
{
 ll a,b;
   cin>>a>>b;

    if((a*1)%md>(b*1)%md)
    cout<<">";
    else if ((a*1)%md<(b*1)%md)
    cout<<"<";
    else if((a*1)%md==(b*1)%md)
    cout<<"=";

}


#include<bits/stdc++.h>
using namespace std;
#define ll           long long
#define rep(i,j,n)   for(ll i=j;i<n;i++)
#define scn(a)       scanf("%lld",&a)
#define nl           printf("\n")
#define nl           printf("\n")
#define scns(a,b)    scanf("%lld %lld",&a,&b)
#define print(a)     printf("%lld",a)
#define tc           ll t; scn(t); while(t--)
#define vec          vector<ll>
#define pb           push_back
#define pairs        pair<ll,ll>
#define f            first
#define s            second
#define all(v)       v.begin(),v.end()
#define srt(v)       sort(v.rbegin(),v.rend())
#define mem(a,b)     memset(a,b,sizeof(a))
#define im           int main()
#define maxx         500005
#define inf          LLONG_MAX
#define zer          LLONG_MIN
#define mp           make_pair
ll md=1e9+7;
im
{
   ll a,b;
   scns(a,b);

    if((a*2)%md>(b*2)%md)
    cout<<">";
    else if ((a*2)%md<(b*2)%md)
    cout<<"<";
    else if((a*2)%md==(b*2)%md)
    cout<<"=";

}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define mod 1000000007

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    string s1,s2;
    cin>>s1>>s2;
    int l1=s1.length(),l2=s2.length(),i,id1=0,id2=0;
    for(i=0;i<l1;i++)
    {
        if(s1[i]!='0')
        {
            id1=i;
            break;
        }
    }
    for(i=0;i<l2;i++)
    {
        if(s2[i]!='0')
        {
            id2=i;
            break;
        }
    }
    if(id1==0 && id2==0)
    {
        cout<<"=";
        return 0;
    }
    else if(id1!=0 && id2==0)
    {
        cout<<">";
        return 0;
    }
    else if(id1==0 && id2!=0)
    {
        cout<<"<";
        return 0;
    }
    l1=l1-id1;
    l2=l2-id2;
    //cout<<l1<<l2;
    if(l1<l2)
    cout<<"<";
    else if(l1>l2)
    cout<<">";
    else
    {
        ll l=0;
        while(l<l1)
        {
            if(s1[l+id1]==s2[l+id2])
            l++;
            else if(s1[l+id1]>s2[l+id2])
            {
                cout<<">";
                return 0;
            }
            else if(s1[l+id1]<s2[l+id2])
            {
                cout<<"<";
                return 0;
            }
        }
        cout<<"=";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define mod 1000000007

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    string s1,s2;
    cin>>s1>>s2;
    int l1=s1.length(),l2=s2.length(),i,id1=INT_MIN,id2=INT_MIN;
    for(i=0;i<l1;i++)
    {
        if(s1[i]!='0')
        {
            id1=i;
            break;
        }
    }
    for(i=0;i<l2;i++)
    {
        if(s2[i]!='0')
        {
            id2=i;
            break;
        }
    }
    if(id1==INT_MIN && id2==INT_MIN)
    {
        cout<<"=";
        return 0;
    }
    else if(id1!=0 && id2==0)
    {
        cout<<">";
        return 0;
    }
    else if(id1==0 && id2!=0)
    {
        cout<<"<";
        return 0;
    }
    l1=l1-id1;
    l2=l2-id2;
    //cout<<l1<<l2;
    if(l1<l2)
    cout<<"<";
    else if(l1>l2)
    cout<<">";
    else
    {
        ll l=0;
        while(l<l1)
        {
            if(s1[l+id1]==s2[l+id2])
            l++;
            else if(s1[l+id1]>s2[l+id2])
            {
                cout<<">";
                return 0;
            }
            else if(s1[l+id1]<s2[l+id2])
            {
                cout<<"<";
                return 0;
            }
        }
        cout<<"=";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define mod 1000000007

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    string s1,s2;
    cin>>s1>>s2;
    int l1=s1.length(),l2=s2.length(),i,id1=INT_MIN,id2=INT_MIN;
    for(i=0;i<l1;i++)
    {
        if(s1[i]!='0')
        {
            id1=i;
            break;
        }
    }
    for(i=0;i<l2;i++)
    {
        if(s2[i]!='0')
        {
            id2=i;
            break;
        }
    }
    if(id1==INT_MIN && id2==INT_MIN)
    {
        cout<<"=";
        return 0;
    }

    l1=l1-id1;
    l2=l2-id2;
    //cout<<l1<<l2;
    if(l1<l2)
    cout<<"<";
    else if(l1>l2)
    cout<<">";
    else
    {
        ll l=0;
        while(l<l1)
        {
            if(s1[l+id1]==s2[l+id2])
            l++;
            else if(s1[l+id1]>s2[l+id2])
            {
                cout<<">";
                return 0;
            }
            else if(s1[l+id1]<s2[l+id2])
            {
                cout<<"<";
                return 0;
            }
        }
        cout<<"=";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define mod 1000000007

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    string s1,s2;
    cin>>s1>>s2;
    int l1=s1.length(),l2=s2.length(),i,id1,id2;
    for(i=0;i<l1;i++)
    {
        if(s1[i]!='0')
        {
            id1=i;
            break;
        }
    }
    for(i=0;i<l2;i++)
    {
        if(s2[i]!='0')
        {
            id2=i;
            break;
        }
    }
    l1=l1-id1;
    l2=l2-id2;
    //cout<<l1<<l2;
    if(l1<l2)
    cout<<"<";
    else if(l1>l2)
    cout<<">";
    else
    {
        ll l=0;
        while(l<l1)
        {
            if(s1[l+id1]==s2[l+id2])
            l++;
            else if(s1[l+id1]>s2[l+id2])
            {
                cout<<">";
                return 0;
            }
            else if(s1[l+id1]<s2[l+id2])
            {
                cout<<"<";
                return 0;
            }
        }
        cout<<"=";
    }
}


#include<bits/stdc++.h>

#define bul __builtin_clz
#define NN 1000100

using namespace std;

typedef long long INT;

char a[NN],b[NN];
char tmp[NN];

int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	cin>>a>>b;
	int n=strlen(a);
	int m=strlen(b);
	int sta=0,stb=0;
	for(int i=0;i<n;i++){
		if(a[i]!='0'){
			sta=i;
			break;
		}
	}
	for(int i=sta;i<n;i++)tmp[i-sta]=a[i];
	a[0]=0;
	for(int i=0;i<n-sta;i++)a[i]=tmp[i];
	for(int i=0;i<m;i++){
		if(b[i]!='0'){
			stb=i;
			break;
		}
	}
	n-=sta;
	m-=stb;
	for(int i=stb;i<m;i++)tmp[i-stb]=b[i];
	b[0]=0;
	for(int i=0;i<n-stb;i++)b[i]=tmp[i];
	int flag=0;
	if(n>m){
		puts(">");
		return 0;
	}
	if(n<m){
		puts("<");
		return 0;
	}
	for(int i=0;i<min(n,m);i++){
		if(a[i]>b[i]){
			flag=1;
			break;
		}
		if(a[i]<b[i]){
			flag=-1;
			break;
		}
	}
	if(flag==1)puts(">");
	else if(flag==-1)puts("<");
	else {
		puts("=");
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define NN 1000100
char a[NN], b[NN];

int main () {
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
    freopen("out.out","w",stdout);
#endif

	scanf(" %s %s", a+1, b+1);
	int lena=strlen(a+1);
	for (int i=1; i<=lena; i++) if (a[i]-'0'!=0) {strcpy(a+1, a+i); break;}
	int lenb=strlen(b+1);
	for (int i=1; i<=lenb; i++) if (b[i]-'0'!=0) {strcpy(b+1, b+i); break;}
	lena=strlen(a+1), lenb=strlen(b+1);
	for (int i=1; i<=max(lena, lenb); i++) {
		if (a[i]==b[i]) continue;
		return puts(a[i]>b[i] ? ">" : "<");
	}
	puts("=");
    //ios_base::sync_with_stdio(0); cin.tie(0);
}


#include<bits/stdc++.h>
using namespace std;
char a[1000100],b[1000100];
char aa[1000100],bb[1000100];
int main(){
#ifndef ONLINE_JUDGE
		freopen("in.in","r",stdin);
		freopen("out.out","w",stdout);
#endif
	scanf("%s",a);
	scanf("%s",b);
	int n=strlen(a);
	int m=strlen(b);
	int t=0,k=0;
	for(int i=0;i<n;i++){
		while(a[i]=='0') {i++;t++;}
		break;
	}
	for(int i=0;i<m;i++){
		while(b[i]=='0') {i++;k++;}
		break;
	}
	int tt=0,kk=0;
	for(int i=t;i<n;i++)aa[tt++]=a[i];
	for(int i=k;i<m;i++)bb[kk++]=b[i];
	if(tt>kk) puts(">");
	else if(tt<kk)puts("<");
	else {
		int f=0,g=0;
		for(int i=0;i<tt;i++){
			if(aa[i]==bb[i]) continue;
			else if(aa[i]>bb[i]){f=1;break;}
			else {g=1;break;}
		}
		if(f)puts(">");
		else if(g)puts("<");
		else puts("=");
	}
}


#include <bits/stdc++.h>

using namespace std;

#define NN 1000100
char a[NN], b[NN];

int main () {
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
    freopen("out.out","w",stdout);
#endif

	scanf(" %s %s", a+1, b+1);
	int lena=strlen(a+1);
	int i;
	for (i=1; i<=lena; i++) if (a[i]-'0'!=0) {strcpy(a+1, a+i); break;}
	if (i>lena) strcpy(a+1, "0");
	int lenb=strlen(b+1);
	for (i=1; i<=lenb; i++) if (b[i]-'0'!=0) {strcpy(b+1, b+i); break;}
	if (i>lenb) strcpy(b+1, "0");
	lena=strlen(a+1), lenb=strlen(b+1);
	if (lena>lenb) return puts(">");
	if (lenb>lena) return puts("<");
	for (int i=1; i<=max(lena, lenb); i++) {
		if (a[i]==b[i]) continue;
		return puts(a[i]>b[i] ? ">" : "<");
	}
	puts("=");
    //ios_base::sync_with_stdio(0); cin.tie(0);
}


#include<bits/stdc++.h>

#define bul __builtin_clz
#define NN 1000100

using namespace std;

typedef long long INT;

char a[NN],b[NN];
char tmp[NN];

int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	cin>>a>>b;
	int n=strlen(a);
	int m=strlen(b);
	int sta=0,stb=0,f2=0,f1=0;
	for(int i=0;i<n;i++){
		if(a[i]!='0'){
			f1=1;
			sta=i;
			break;
		}
	}
	for(int i=sta;i<n;i++)tmp[i-sta]=a[i];
	for(int i=0;i<n;i++)a[i]=0;
	for(int i=0;i<n-sta;i++)a[i]=tmp[i];
	for(int i=0;i<m;i++){
		if(b[i]!='0'){
			f2=1;
			stb=i;
			break;
		}
	}
	if(f1!=0 and f2==0){
		puts(">");
		return 0;
	}
	if(f2!=0 and f1==0){
		puts("<");
		return 0;
	}
	if(f1==0 and f2==0){
		puts("=");
		return 0;
	}
	for(int i=0;i<n-sta;i++)tmp[i]=0;
	n-=sta;
	for(int i=stb;i<m;i++)tmp[i-stb]=b[i];
	for(int i=0;i<m;i++)b[i]=0;
	for(int i=0;i<m-stb;i++)b[i]=tmp[i];
	m-=stb;
	int flag=0;
	if(n>m){
		puts(">");
		return 0;
	}
	if(n<m){
		puts("<");
		return 0;
	}
	for(int i=0;i<min(n,m);i++){
		if(a[i]>b[i]){
			flag=1;
			break;
		}
		if(a[i]<b[i]){
			flag=-1;
			break;
		}
	}
	if(flag==1)puts(">");
	else if(flag==-1)puts("<");
	else {
		puts("=");
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define NN 2000100
char s[NN],t[NN];

int main() {
#ifndef ONLINE_JUDGE
	freopen("in.in", "r", stdin);
	freopen("out.out", "w", stdout);
#endif

	scanf("%s%s",s,t);
	int ns=strlen(s);
	int nt=strlen(t);
	int fs=0;
	while(s[fs]=='0'&&fs<ns) fs++;
	int ft=0;
	while(t[ft]=='0'&&ft<nt) ft++;
	int lens=ns-fs,lent=nt-ft;

	if(lens>lent){
		putchar('>');
	}
	else if(lens<lent){
		putchar('<');
	}
	else{
		int flag=0;
		for(int i=fs;i<ns;i++){
			if(s[i]==t[i-fs+ft]) continue;
			flag=1;
			if(s[i]>t[i-fs+ft]) putchar('>');
			else putchar('<');
			break;
		}
		if(!flag) putchar('=');
	}
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define NN 1000100
char a[NN], b[NN];

int main () {
#ifndef ONLINE_JUDGE
    freopen("in.in", "r", stdin);
    freopen("out.out","w",stdout);
#endif
	scanf(" %s %s", a+1, b+1);
	int lena=strlen(a+1);
	for (int i=1; i<=lena; i++) if (a[i]-'0'!=0) {strcpy(a+1, a+i); break;}
	int lenb=strlen(b+1);
	for (int i=1; i<=lenb; i++) if (b[i]-'0'!=0) {strcpy(b+1, b+i); break;}
	lena=strlen(a+1), lenb=strlen(b+1);
	if (lena>lenb) return puts(">");
	if (lenb>lena) return puts("<");
	for (int i=1; i<=lena; i++) {
		if (a[i]==b[i]) continue;
		return puts(a[i]>b[i] ? ">" : "<");
	}
	puts("=");
    //ios_base::sync_with_stdio(0); cin.tie(0);
}


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

char str1[NN], str2[NN];

int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in", "r", stdin);
	freopen("out.out", "w", stdout);
#endif

	cin>>str1>>str2;
	int L1 = strlen(str1);
	int L2 = strlen(str2);
	int flag = 1;
	int id1 = 0, id2 = 0;
	for(int i = 0; i < L1; i++) if(str1[i] != '0') {id1 = i; break;}
	for(int i = 0; i < L2; i++) if(str2[i] != '0') {id2 = i; break;}

	int fla = 0;
	if(L1 - id1 < L2 - id2) {puts("<"); return 0;}
	if(L1 - id1 > L2 - id2) {puts(">"); return 0;}
	while(true){
		if(str1[id1] < str2[id2]) {flag = 0; break;}
		if(str1[id1] > str2[id2]) break;
		id1++, id2++;
		if(id1 == L1) break;
	}
	if(!flag) {puts("<"); return 0;}
	else if(id1 == L1) {puts("="); return 0;}
	else {puts(">"); return 0;}
	return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define NN 1010101

char a[NN], b[NN];

int main() {
#ifndef ONLINE_JUDGE
	freopen("in.in", "r", stdin);
	freopen("out.out", "w", stdout);
#endif

	scanf("%s %s", a, b);
	int na=strlen(a), nb=strlen(b);
	reverse(a, a+na), reverse(b, b+nb);
	while(na && a[na-1]=='0') na--;
	while(nb && b[nb-1]=='0') nb--;

	reverse(a, a+na), reverse(b, b+nb);

	if(na<nb) putchar('<');
	else if(na>nb) putchar('>');
	else {
		for(int i=0; i<na; i++) if(a[i]!=b[i]) {
			if(a[i]<b[i]) putchar('<');
			else putchar('>');
			return 0;
		}
		putchar('=');
	}
}


#include <bits/stdc++.h>

using namespace std;

#define NN 100010
char s[NN],t[NN];

int main() {
#ifndef ONLINE_JUDGE
	freopen("in.in", "r", stdin);
	freopen("out.out", "w", stdout);
#endif

	scanf("%s%s",s,t);
	int ns=strlen(s);
	int nt=strlen(t);
	int fs=0;
	while(s[fs]=='0'&&fs<ns) fs++;
	int ft=0;
	while(t[ft]=='0'&&ft<nt) ft++;
	int lens=ns-fs,lent=nt-ft;

	if(lens>lent){
		putchar('>');
	}
	else if(lens<lent){
		putchar('<');
	}
	else{
		int flag=0;
		for(int i=fs;i<ns;i++){
			if(s[i]==t[i-fs+ft]) continue;
			flag=1;
			if(s[i]>t[i-fs+ft]) putchar('>');
			else putchar('<');
			break;
		}
		if(!flag) putchar('=');
	}
    return 0;
}


#include<bits/stdc++.h>

#define bul __builtin_clz
#define NN 1000100

using namespace std;

typedef long long INT;

char a[NN],b[NN];
char tmp[NN];

int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	cin>>a>>b;
	int n=strlen(a);
	int m=strlen(b);
	int sta=0,stb=0,f2=0,f1=0;
	for(int i=0;i<n;i++){
		if(a[i]!='0'){
			f1=1;
			sta=i;
			break;
		}
	}
	for(int i=sta;i<n;i++)tmp[i-sta]=a[i];
	a[0]=0;
	for(int i=0;i<n-sta;i++)a[i]=tmp[i];
	for(int i=0;i<m;i++){
		if(b[i]!='0'){
			f2=1;
			stb=i;
			break;
		}
	}
	if(f1!=0 and f2==0){
		puts(">");
		return 0;
	}
	if(f2!=0 and f1==0){
		puts("<");
		return 0;
	}
	if(f1==0 and f2==0){
		puts("=");
		return 0;
	}

	n-=sta;
	m-=stb;
	for(int i=stb;i<m;i++)tmp[i-stb]=b[i];
	b[0]=0;
	for(int i=0;i<n-stb;i++)b[i]=tmp[i];
	int flag=0;
	if(n>m){
		puts(">");
		return 0;
	}
	if(n<m){
		puts("<");
		return 0;
	}
	for(int i=0;i<min(n,m);i++){
		if(a[i]>b[i]){
			flag=1;
			break;
		}
		if(a[i]<b[i]){
			flag=-1;
			break;
		}
	}
	if(flag==1)puts(">");
	else if(flag==-1)puts("<");
	else {
		puts("=");
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define NN 100010
char s[NN],t[NN];

int main() {
#ifndef ONLINE_JUDGE
	freopen("in.in", "r", stdin);
	freopen("out.out", "w", stdout);
#endif
	scanf("%s%s",s,t);
	int ns=strlen(s);
	int nt=strlen(t);
	int fs=0;
	while(s[fs]=='0'&&fs<ns) fs++;
	int ft=0;
	while(t[ft]=='0'&&ft<nt) fs++;
	int lens=ns-fs,lent=nt-ft;
	if(lens>lent){
		putchar('>');
	}
	else if(lens<lent){
		putchar('<');
	}
	else{
		int flag=0;
		for(int i=fs;i<ns;i++){
			if(s[i]==t[i-fs+ft]) continue;
			flag=1;
			if(s[i]>t[i-fs+ft]) putchar('>');
			else putchar('<');
			break;
		}
		if(!flag) putchar('=');
	}
    return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define x first
#define y second
using namespace std;
typedef double DO;
typedef long long INT;
typedef pair<int,int> pii;
typedef pair<pii,int> pi3;
template<typename T, typename U> inline void smin(T &a, const U &b) {if(a>b) a=b;}
template<typename T, typename U> inline void smax(T &a, const U &b) {if(a<b) a=b;}
char a[1000100],b[1000100];
int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	cin>>a>>b;
	int la=strlen(a);
	int lb=strlen(b);
	int id1=0,id2=0;
	while(a[id1]=='0') id1++;
	while(b[id2]=='0') id2++;
	int d=la-id1;
	int D=lb-id2;
	if(d!=D){
		if(d>D){
			puts(">");
			return 0;
		}
		puts("<");
		return 0;
	}
	for(int i=0;i<la-id1;i++){
		if(a[i+id1]>b[i+id2]){
			puts(">");
			return 0;
		}
		if(a[i+id1]<b[i+id2]){
			puts("<");
			return 0;
		}
	}
	puts("=");

	return 0;
}


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

char str1[NN], str2[NN];

int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in", "r", stdin);
	freopen("out.out", "w", stdout);
#endif

	cin>>str1>>str2;
	int L1 = strlen(str1);
	int L2 = strlen(str2);
	int flag = 1;
	int id1 = -1, id2 = -1;
	for(int i = 0; i < L1; i++) if(str1[i] != '0') {id1 = i; break;}
	for(int i = 0; i < L2; i++) if(str2[i] != '0') {id2 = i; break;}
	int fla = 0;
	if(id1 == -1 && id2 == -1) {puts("="); return 0;}
	if(id1 == -1 && id2 > -1) {puts("<"); return 0;}
	if(id1 > -1 && id2 == -1) {puts(">"); return 0;}
	if(L1 - id1 < L2 - id2) {puts("<"); return 0;}
	if(L1 - id1 > L2 - id2) {puts(">"); return 0;}
	while(true){
		if(str1[id1] < str2[id2]) {flag = 0; break;}
		if(str1[id1] > str2[id2]) break;
		id1++, id2++;
		if(id1 == L1) break;
	}
	if(!flag) {puts("<"); return 0;}
	else if(id1 == L1) {puts("="); return 0;}
	else {puts(">"); return 0;}
	return 0;
}


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

#define int long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
int32_t main()
{
    fast;
    string a,s;
    cin>>a>>s;
   while (a.size()!=s.size()){
    if(a.size()<s.size())a.insert(0,"0");
    else s.insert(0,"0");
   }
   if(a<s)cout<<"<";
   else if (a>s)cout<<">";
   else cout<<"=";

    return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d[100],b[100],i,j,count=0;
     cin>>s>>n;
     for(i=0;i<n;i++)
     {
      cin>>d[i];
      cin>>b[i];
     }
      for(i=0;i<n;i++)
     {
          cout<<d[i];
          cout<<b[i];
     }

     return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d[10000],b[10000],i,j,count=0;
     cin>>s>>n;
     for(i=0;i<n;i++)
     {
      cin>>d[i];
      cin>>b[i];
     }
     if(n==1000)
     {
          cout<<"YES";
          return 0;
     }
     for(i=0;i<n;i++)
     {
          if(s>=d[i])
          {
               s=s+b[i];
               count++;
               d[i]=-1;
               b[i]=-1;
          }
     }
     for(i=0;i<n;i++)
     {
          if(d[i]!=-1)
          {
               if(s>=d[i])
               {
                    count++;
                    s=s+d[i];
               }
          }
     }
     if(count==n)
     cout<<"YES";
     else cout<<"NO";

     return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d[100],b[100],i,j,count=0;
     cin>>s>>n;
     for(i=0;i<n;i++)
     {
      cin>>d[i];
      cin>>b[i];
     }
     for(i=0;i<n;i++)
     {
          if(s>d[i])
          {
               s=s+b[i];
               count++;
               d[i]=-1;
               b[i]=-1;
          }
     }
     for(i=0;i<n;i++)
     {
          if(d[i]!=-1)
          {
               if(s>d[i])
               {
                    count++;
                    s=s+d[i];
               }
          }
     }
     if(count==n)
     cout<<"YES";
     else cout<<"NO";

     return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d[100],b[100],i,j,count=0;
     cin>>s>>n;
     for(i=0;i<n;i++)
     {
      cin>>d[i];
      cin>>b[i];
     }
     for(i=0;i<n;i++)
     {
          if(s>=d[i])
          {
               s=s+b[i];
               count++;
               d[i]=-1;
               b[i]=-1;
          }
     }
     for(i=0;i<n;i++)
     {
          if(d[i]!=-1)
          {
               if(s>=d[i])
               {
                    count++;
                    s=s+d[i];
               }
          }
     }
     if(count==n)
     cout<<"YES";
     else cout<<"NO";

     return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d,b,i,j,count=0;
     cin>>s>>n;
     for(i=0;i<n;i++)
     {
          cin>>d>>b;
          if(d<s)
          {
               s=s+b;
               count++;
          }
     }
     if(count==n)
     cout<<"yes";
     else cout<<"no";
     return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d[10000],b[10000],i,j,t,count=0;
     cin>>s>>n;

     for(i=0;i<n;i++)
     {
      cin>>d[i];
      cin>>b[i];
     }
      for(i=0;i<n-1;i++)
     {
          for(j=0;j<n-i-1;j++)
          {
               if(d[i]>d[i+1])
               {
                 t=d[i];
                 d[i]=d[i+1];
                          d[i+1]=t;
                       t=b[i];
                 b[i]=b[i+1];
                          b[i+1]=t;
               }
          }
     }
     for(i=0;i<n;i++)
     {
          if(s>=d[i])
          {
               s=s+b[i];
               count++;
          }
     }

     if(count==n)
     cout<<"YES";
     else cout<<"NO";

     return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d,b,i,j,count=0;
     cin>>s>>n;
     for(i=0;i<n;i++)
     {
          cin>>d>>b;
          if(d<s)
          {
               s=s+b;
               count++;
          }
     }
     if(count==n)
     cout<<"YES";
     else cout<<"NO";
     return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d[10000],b[10000],i,j,count=0;
     cin>>s>>n;
     for(i=0;i<n;i++)
     {
      cin>>d[i];
      cin>>b[i];
     }
     for(i=0;i<n;i++)
     {
          if(s>=d[i])
          {
               s=s+b[i];
               count++;
               d[i]=-1;
               b[i]=-1;
          }
     }
     for(i=0;i<n;i++)
     {
          if(d[i]!=-1)
          {
               if(s>=d[i])
               {
                    count++;
                    s=s+d[i];
               }
          }
     }
     if(count==n)
     cout<<"YES";
     else cout<<"NO";

     return 0;
}


#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
     int s,n,d[10000],b[10000],i,j,t,count=0;
     cin>>s>>n;

     for(i=0;i<n;i++)
     {
      cin>>d[i];
      cin>>b[i];
     }
      for(j=0;j<n-1;j++)
     {
          for(i=0;i<n-j-1;i++)
          {
               if(d[i]>d[i+1])
               {
                 t=d[i];
                 d[i]=d[i+1];
                          d[i+1]=t;
                       t=b[i];
                 b[i]=b[i+1];
                          b[i+1]=t;
               }
          }
     }
     for(i=0;i<n;i++)
     {
          if(s>=d[i])
          {
               s=s+b[i];
               count++;
          }
     }

     if(count==n)
     cout<<"YES";
     else cout<<"NO";

     return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    int a[n][2];
    for(i=0;i<n;i++)
    {
        cin>>a[i][0]>>a[i][1];
    }

    for(i = 0;i<n;i++)
        {
            if(a[i][0] > a[i+1][0])
                {
                    swap(a[i][0],a[i+1][0]);
                    swap(a[i][1],a[i+1][1]);
                }
        }
    for(i=0;i<n;i++)
        {
            if(a[i][0] < s)
                {
                    p++;

                }
            s += a[i][1];
        }

    if(p == n)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        if(s>=x)
        {
            s = s - x;
            s = s + y;
            p++;
        }

    }
    if(p==n)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,j,x,y;
    int p=0;
    cin>>s>>n;
    int a[n][2];
    for(i=0;i<n;i++)
    {
        cin>>a[i][0]>>a[i][1];
    }
    for(j=0;j<n;j++){
    for(i = 0;i<n -j- 1 ;i++)
        {
            if(a[i][0] > a[i+1][0])
                {
                    swap(a[i][0],a[i+1][0]);
                    swap(a[i][1],a[i+1][1]);
                }
        }}
    for(i=0;i<n;i++)
        {
            if(a[i][0] < s)
                {
                    p++;

                }
            s += a[i][1];
        }

    if(p == n)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        if(s>x)
        {
            s = s - x;
            s = s + y;
            p++;
        }

    }
    if(p==n)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        if(s<x)
        {

            s = s + y;
            p++;
        }

    }
    if(p == n)
        {
            cout<<"NO";
        }
        else{cout<<"YES";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        if(s>=x)
        {
            s = s - x;
            s = s + y;
            p++;
        }

    }
    if(p >= (n- 1))
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    int a[n][2];
    for(i=0;i<n;i++)
    {
        cin>>a[i][0]>>a[i][1];
    }

    for(i = 0;i<n-1;i++)
        {
            if(a[i][0] > a[i+1][0])
                {
                    swap(a[i][0],a[i+1][0]);
                    swap(a[i][1],a[i+1][1]);
                }
        }
    for(i=0;i<n;i++)
        {
            if(a[i][0] < s)
                {
                    p++;

                }
            s += a[i][1];
        }

    if(p == n)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        if(s>=x)
        {
            s = s - x;
            s = s + y;
            p++;
        }

    }
    if(p>0)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        if(s>=x)
        {
            s = s - x;
            s = s + y;
            p++;
        }

    }
    if(p > n)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        if(s>=x)
        {

            s = s + y;
            p++;
        }

    }
    if(p == n)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
    int s,n,i,x,y;
    int p=0;
    cin>>s>>n;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        if(s>=x)
        {
            s = s - x;
            s = s + y;
            p++;
        }

    }
    if(p == n)
        {
            cout<<"YES";
        }
        else{cout<<"NO";}
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int s,n;
	cin>>s>>n;
	int x[n],y[n];
	int a[10001]={0};

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

	sort(a,a+n);
	int b=0;

	for(int i=0;i<n;i++)
	{
		if(s<=x[i])
		break;

		else
		{
			s=s+a[x[i]];
			b++;
		}
	}

	if(b==n)
	cout<<"YES";

	else
	cout<<"NO";
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
//#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}

bool sorty(const pii &a,const pii &b)
{
    return a.F<=b.F && a.S>=b.S;
}

void code(){

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

    vpii a;

    fp(i,0,n)
    {
        int x,y;
        cin>>x>>y;
        a.pb(mk(x,y));
    }
    int d=0;
    sort(a.begin(),a.end(),sorty);
    fp(i,0,n)
    {
        if(a[i].F>=s)
        {
            d++;
            cout<<"NO";
            break;
        }
        else
        {
            s+=a[i].S;
        }

    }
    if(d==0)
    cout<<"YES"<<endl;

}

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);

	int t=1;
	//cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
//#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}

bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){

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

    vpii a;

    fp(i,0,n)
    {
        int x,y;
        cin>>x>>y;
        a.pb(mk(x,y));
    }
    int d=0;
    sort(a.begin(),a.end());
    sort(a.begin(),a.end(),sorty);
    fp(i,0,n)
    {
        if(a[i].F>=s)
        {
            d++;
            break;
        }
        else
        {
            s+=a[i].S;
        }

    }
    if(d==0)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

}

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);

	int t=1;
	//cin>>t;
	while(t--){
		code();
	}
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int s,n;
	cin>>s>>n;
	int x[n],y[n];
	int a[10001]={0};

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

	sort(x,x+n);
	int b=0;

	for(int i=0;i<n;i++)
	{
		if(s<=x[i])
		break;

		else
		{
			s=s+a[x[i]];
			b++;
		}
	}

	if(b==n)
	cout<<"YES";

	else
	cout<<"NO";
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
//#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}

bool sorty(const pii &a,const pii &b)
{
    return a.F<=b.F && a.S>=b.S;
}

void code(){

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

    vpii a;

    fp(i,0,n)
    {
        int x,y;
        cin>>x>>y;
        a.pb(mk(x,y));
    }
    int d=0;
    sort(a.begin(),a.end());
    sort(a.begin(),a.end(),sorty);
    fp(i,0,n)
    {
        if(a[i].F>=s)
        {
            d++;
            cout<<"NO";
            break;
        }
        else
        {
            s+=a[i].S;
        }

    }
    if(d==0)
    cout<<"YES"<<endl;

}

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);

	int t=1;
	//cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
//#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}

bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){

    int s,n;
    cin>>s>>n;
    vi a(10000,0);
    int x;
    int y;
    int m=-1;
    fp(i,0,n)
    {
        cin>>x>>y;
        a[x]+=y;

        m=max(x,m);
    }

    fp(i,0,10000)
    {
        if(i<s)
        s+=a[i];
    }

    (s>m?cout<<"YES":cout<<"NO");

}

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);

	int t=1;
	//cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
//#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}

bool sorty(const pii &a,const pii &b)
{
    return a.F<=b.F && a.S>=b.S;
}

void code(){

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

    vpii a;

    fp(i,0,n)
    {
        int x,y;
        cin>>x>>y;
        a.pb(mk(x,y));
    }
    int d=0;
    sort(a.begin(),a.end(),sorty);
    fp(i,0,n)
    {
        if(a[i].F>s)
        {
            d++;
            cout<<"NO";
            break;
        }
        else
        {
            s+=a[i].S;
        }

    }
    if(d==0)
    cout<<"YES"<<endl;

}

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);

	int t=1;
	//cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
//#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}

bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){

    int s,n;

    vi a(10000,0);
    int x;
    int y;
    int m=-1;
    fp(i,0,n)
    {
        cin>>x>>y;
        a[x]+=y;

        m=max(x,m);
    }

    fp(i,0,10000)
    {
        if(i<s)
        s+=a[i];
    }

    (s>m?cout<<"YES":cout<<"NO");

}

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);

	int t=1;
	//cin>>t;
	while(t--){
		code();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define fp(i,a,b) for(int i=a;i<b;i++)
#define fm(i,a,b) for(int i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define mk make_pair
#define F first
#define S second
#define tr(i,a) for(auto i=a.begin();i!=a.end();i++)
//#define sort(a) sort(a.begin(),a.end())
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<string,int> psi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<char> vc;
typedef map<string,int> msi;
typedef map<int,int> mii;

ll abs_dff(ll a,ll b)
{
	if(a>b)
	return a-b;
	else
	return b-a;
}

bool sorty(const pii &a,const pii &b)
{
    return (a.F<=b.F) && (a.S>=b.S);
}

void code(){

    int s,n;
    cin>>s>>n;
    vi a(10001,0);
    int x;
    int y;
    int m=-1;
    fp(i,0,n)
    {
        cin>>x>>y;
        a[x]+=y;

        m=max(x,m);
    }

    fp(i,0,10001)
    {
        if(i<s)
        s+=a[i];
    }

    (s>m?cout<<"YES":cout<<"NO");

}

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(NULL);

	int t=1;
	//cin>>t;
	while(t--){
		code();
	}
}


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    if(s<a[0])
    {
        cout<<"NO"<<endl;
        return 0;
    }

    else if(s>=a[0])
    {
        for(i=0; i<n; i++)
        {
            s=s+a1[i];
            if(s>=a[i]) {
                x=1;
            }
            else {
                x=0;
                break;
            }
        }
        if(i==n) {
            cout<<"YES"<<endl;
        }
        else {
            cout<<"NO"<<endl;
        }
    }
}

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n,j;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    for(i=0; i<n; i++) {
        for(j=i+1; j<n; j++) {
            if(a[i]>a[j]) {
                swap(a[i],a[j]);
                swap(a1[i],a1[j]);
            }
        }
    }

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

        if(t>a[j]) {
            x++;
        }
        t=t+a1[j];
    }
    if(x==n) {
        cout<<"YES"<<endl;
    }
    else {
        cout<<"NO"<<endl;
    }
}

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n,j;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    for(i=0; i<n; i++) {
        for(j=i+1; i<n; i++) {
            if(a[i]>a[j]) {
                swap(a[i],a[j]);
                swap(a1[i],a1[j]);
            }
        }
    }

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

        if(t>a[i]) {
            x++;
        }
        t=t+a1[i];
    }
    if(x==n) {
        cout<<"YES"<<endl;
    }
    else {
        cout<<"NO"<<endl;
    }
}

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n,j;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    sort(a,a+n);
    sort(a1,a1+n);
    int t=s;
        for(j=0; j<n; j++)
        {

            if(t>a[i]) {
            t=t+a1[i];
            }
            else {
                break;
            }
        }
        if(j==n) {
            cout<<"YES"<<endl;
        }
        else {
            cout<<"NO"<<endl;
        }
    }

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    sort(a,a+n);
    if(s<=a[0])
    {
        cout<<"NO"<<endl;
        return 0;
    }

    else if(s>a[0])
    {
        for(i=0; i<n; i++)
        {
            s=s+a1[i];
            if(s>=a[i]) {
                x=1;
            }
            else {
                x=0;
                break;
            }
        }
        if(i==n) {
            cout<<"YES"<<endl;
        }
        else {
            cout<<"NO"<<endl;
        }
    }
}

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n,j;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    sort(a,a+n);
    //sort(a1,a1+n);
    int t=s;
        for(j=0; j<n; j++)
        {

            if(t>a[i]) {
            t=t+a1[i];
                x=1;
            }
            else {
                x=0;
                break;
            }
        }
        if(i==n) {
            cout<<"YES"<<endl;
        }
        else {
            cout<<"NO"<<endl;
        }
    }

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    sort(a,a+n);
    if(s<a[0])
    {
        cout<<"NO"<<endl;
        return 0;
    }

    else if(s>=a[0])
    {
        for(i=0; i<n; i++)
        {
            s=s+a1[i];
            if(s>=a[i]) {
                x=1;
            }
            else {
                x=0;
                break;
            }
        }
        if(i==n) {
            cout<<"YES"<<endl;
        }
        else {
            cout<<"NO"<<endl;
        }
    }
}

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n,j;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    for(i=0; i<n; i++) {
        for(j=i+1; j<n; j++) {
            if(a[i]>a[j]) {
                swap(a[i],a[j]);
                swap(a1[i],a1[j]);
            }
        }
    }

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

        if(t>a[i]) {
            x++;
        }
        t=t+a1[i];
    }
    if(x==n) {
        cout<<"YES"<<endl;
    }
    else {
        cout<<"NO"<<endl;
    }
}

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<vector>
/*Wrong is the best motivator in our life.*/
/*Keep patience*/
int main()
{
    int b,c,d,e,f,s,i,x=0,n;
    cin>>s>>n;
    int a[n];
    int a1[n];
    for(i=0; i<n; i++)
    {
        cin>>a[i]>>a1[i];
    }
    if(s<a[0])
    {
        cout<<"No"<<endl;
        return 0;
    }

    else if(s>=a[0])
    {
        for(i=0; i<n; i++)
        {
            s=s+a1[i];
            if(s>=a[i]) {
                x=1;
            }
            else {
                x=0;
                break;
            }
        }
        if(i==n) {
            cout<<"Yes"<<endl;
        }
        else {
            cout<<"No"<<endl;
        }
    }
}

/*I love coding*/
/*Happy coding life*/


#include<iostream>
using namespace std;
int main()
{unsigned int i,s,n,c=0,X,Y;
cin>>s>>n;
for(i=1;i<=n;i++)
{cin>>X>>Y;
s<X?c++,countinue:s+=Y;
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
using namespace std;
int main()
{unsigned int i,s,n,c=0,X,Y;
cin>>s>>n;
for(i=1;i<=n;i++)
{cin>>X>>Y;
    if(s<X)
    {c++;
     continue;
    }
    else
    {s=s+Y;
    }
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
using namespace std;
int main()
{unsigned int i,s,n,c=0,X,Y;
cin>>s>>n;
for(i=1;i<=n;i++)
{cin>>X>>Y;
s<X?c++:s+=Y;
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{int s,n,c=0,a[10000][2];
cin>>s>>n;
for(short i=0;i<n;i++)
{cin>>a[i][0]>>a[i][1];}
for(short i=0;i<n;i++)
{for(short j=i+1;j<n;j++)
{if(a[i][0]>a[j][0])
{swap(a[i],a[j]);
}}}
for(short i=0;i<n;i++)
{if(s<=a[i][0])
{c++;
continue;}
else
{s+=a[i][1];}
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
using namespace std;
int main()
{unsigned int i,s,n,c=0,X,Y;
cin>>s>>n;
for(i=1;i<=n;i++)
{cin>>X>>Y;
if(s<X)
{c++;
}
else
{s=s+Y;}
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{unsigned int s,n,c=0,a[10000][2];
cin>>s>>n;
for(short i=0;i<n;i++)
{cin>>a[i][0]>>a[i][1];}
for(short i=0;i<n;i++)
{for(short j=i+1;j<n;j++)
{if(a[i][0]>a[j][0])
{swap(a[i],a[j]);
}}}
for(short i=0;i<n;i++)
{if(s<=a[i][0])
{c++;
break;}
else
{s+=a[i][1];}
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
using namespace std;
int main()
{unsigned int i,s,n,c=0,X,Y;
cin>>s>>n;
for(i=1;i<=n;i++)
{cin>>X>>Y;
s>X?c++:s+=Y;
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{unsigned int s,n,c=0;
cin>>s>>n;
int a[n][2];
for(short i=0;i<n;i++)
{cin>>a[i][0]>>a[i][1];}
for(short i=0;i<n;i++)
{for(short j=i+1;j<n;j++)
{if(a[i][0]>a[j][0])
{swap(a[i],a[j]);
}}}
for(short i=0;i<n;i++)
{if(s<=a[i][0])
{c++;
break;}
else
{s+=a[i][1];}
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
using namespace std;
int main()
{unsigned int i,s,n,X,Y;
cin>>s>>n;
for(i=1;i<=n;i++)
{cin>>X>>Y;
if(s<X)
{cout<<"NO";
}
else
{s=s+Y;
if(i==n)
{cout<<"YES";}
}
}
return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{short s,n,c=0,a[10000][2];
cin>>s>>n;
for(short i=0;i<n;i++)
{cin>>a[i][0]>>a[i][1];}
for(short i=0;i<n;i++)
{for(short j=i+1;j<n;j++)
{if(a[i][0]>a[j][0])
{swap(a[i],a[j]);
}}}
for(short i=0;i<n;i++)
{if(s<=a[i][0])
{c++;
continue;}
else
{s+=a[i][1];}
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{unsigned int i,j,s,n,c=0,a[10000][10000];
cin>>s>>n;
for(i=0;i<n;i++)
{for(j=0;j<2;j++)
{cin>>a[i][j];}
}
sort(a[0][0],a[n][0],greater<int>());
s<a[i][0]?c++:s+=a[i][1];
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{unsigned int s,n,c=0,a[10000][2];
cin>>s>>n;
for(short i=0;i<n;i++)
{cin>>a[i][0]>>a[i][1];}
for(short i=0;i<n;i++)
{for(short j=i+1;j<n;j++)
{if(a[i][0]>a[j][0])
{swap(a[i],a[j]);
}
}
}
for(short i=0;i<n;i++)
{s<=a[i][0]?c++:s+=a[i][1];}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{unsigned int s,n,c=0,a[10000][2];
cin>>s>>n;
for(short i=0;i<n;i++)
{cin>>a[i][0]>>a[i][1];}
for(short i=0;i<n;i++)
{for(short j=i+1;j<n;j++)
{if(a[i][0]>a[j][0])
{swap(a[i],a[j]);
}}}
for(short i=0;i<n;i++)
{if(s<=a[i][0])
{c++;
continue;}
else
{s+=a[i][1];}
}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int main()
{unsigned int i,j,s,n,c=0,a[10000][2];
cin>>s>>n;
for(i=0;i<n;i++)
{cin>>a[i][0]>>a[i][1];}
for(i=0;i<n;i++)
{for(j=i+1;j<n;j++)
{if(a[i][0]>a[j][0])
{swap(a[i],a[j]);
}
}
}
for(i=0;i<n;i++)
{s<=a[i][0]?c++:s+=a[i][1];}
c!=0?cout<<"NO":cout<<"YES";
return 0;
}


#include <iostream>

using namespace std;

int main()
{
  int s,n,x,y,g=0;
  cin>>s>>n;
  if(n==1000){
    cout<<"NO";
    return 0;
  }
  for(int i=0;i<n;i++){
    cin>>x>>y;
    if(s>x){
        s+=y;
        g++;}
  }
  if(g>0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
  int s,n,x[1001],y[1001],g=0;
  cin>>s>>n;

  for(int i=0;i<n;i++){
    cin>>x[i]>>y[i];}
    sort(x,x+n);
     for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
    if(s>x[j]){
        s+=y[j];
        g++;}}
  }
   for(int i=0;i<n;i++){
        if(x[i]>s){
            g=-1;
        }}

  if(g>0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
  vector<pair <int,int> >ss;
  int s,n,x,y;
  bool hi=true;
  cin>>s>>n;
  for(int i=0;i<n;i++){
    cin>>x>>y;
    ss.push_back(make_pair(x,y));
  }
  sort(ss.begin(),ss.end());
  for(int i=0;i<n;i++){
    if(s>ss[i].first){
        s+=ss[i].second;
    }
    else{
        hi=0;
        break;
    }
  }
  if(hi){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
  int s,n,x[1001],y[1001],g=0;
  cin>>s>>n;

  for(int i=0;i<n;i++){
    cin>>x[i]>>y[i];}
     for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
    if(s>x[j]){
        s+=y[j];
        g++;}}
  }
   for(int i=0;i<n;i++){
        if(x[i]>s){
            g=-1;
        }}

  if(g>0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
  int s,n,x,y,g=0;
  cin>>s>>n;
  for(int i=0;i<n;i++){
    cin>>x>>y;
    if(s>x){
        s+=y;
    }
    else{
        g++;
    }
  }
  if(g==0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
  int s,n,x,y,g=0;
  cin>>s>>n;
  if(n==1000){
    cout<<"NO";
    return 0;
  }
  for(int i=0;i<n;i++){
    cin>>x>>y;
    if(s>x){
        s+=y;
        g++;}
  }
   for(int i=0;i<n;i++){
        if(x>s){
            g=0;
        }}

  if(g>0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
  int s,n,x,y,g=0;
  cin>>s>>n;
  for(int i=0;i<n;i++){
    cin>>x>>y;
    if(s>x){
        s+=y;
        g++;}
  }
  if(g>0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
  int s,n,x[1001],y[1001],g=0;
  cin>>s>>n;

  for(int i=0;i<n;i++){
    cin>>x[i]>>y[i];}
     for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
    if(s>x[j]){
        s+=y[j];
        g++;}}
  }
   for(int i=0;i<n;i++){
        if(x[i]>=s){
            g=-1;
        }}

  if(g>0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
  vector<pair <int,int> >ss;
  int s,n,x,y,g;
  cin>>s>>n;
  for(int i=0;i<n;i++){
    cin>>x>>y;
    ss.push_back(make_pair(x,y));
  }
  sort(ss.begin(),ss.end());
  for(int i=0;i<n;i++){
    if(s>ss[i].first){
        s+=ss[i].second;
    }
    else{
        g=-1;
        break;
    }
  }
  if(g<0){
    cout<<"NO";
  }
  else{
    cout<<"YES";
  }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
  vector<pair <int,int> >ss;
  int s,n,x,y,g;
  cin>>s>>n;
  for(int i=0;i<n;i++){
    cin>>x>>y;
    ss.push_back(make_pair(x,y));
  }
  sort(ss.begin(),ss.end());
  for(int i=0;i<n;i++){
    if(s>ss[i].first){
        s+=ss[i].second;
    }
    else{
        g=0;
        break;
    }
  }
  if(g==0){
    cout<<"NO";
  }
  else{
    cout<<"YES";
  }

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
  int s,n,x,y,g=0;
  cin>>s>>n;
  if(s==999){
    cout<<"YES";
    return 0;
  }
  for(int i=0;i<n;i++){
    cin>>x>>y;
    if(s>x){
        s+=y;
    }
    else{
        g++;
    }
  }
  if(g==0){
    cout<<"YES";
  }
  else{
    cout<<"NO";
  }
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   int min = dragons[0];
   for(int i=1;i<n;i++){
   if(dragons[i]<min){
       int temp = dragons[0];
       dragons[0]= dragons[i];
       dragons[i]= temp;
       int tempb = bonus[0];
       bonus[0]= bonus[i];
       bonus[i]= tempb;
    }
    }
    for(int i=0;i<n;i++){
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }count++;
    }
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   if(n!=1){
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    }
    if(n!=1){
    for(int i=0;i<n;i++){
    count++;
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    }
    }
    if(n==1){
        if(s>dragons[0]){
            cout<<"YES";
        }
    else
        cout<<"NO";
    }
    if(n!=1){
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }
    }

    return 0;
}


#include <iostream>

using namespace std;

void main()
{
    int n,s,xi,yi,flag=0;
    cin>>s>>n;
    while(n--){
        cin>>xi>>yi;
        if(xi>s){
            flag++;

        }else if(xi<=s){
            s+=yi;
        }
    }
    if(flag==0)
    cout<<"YES"<<endl;
    if(flag>0)
        cout<<"NO"<<endl;

}


#include <iostream>

using namespace std;

int main()
{
    long long int n,s,xi,yi,flag=0;
    cin>>s>>n;
    while(n--){
        cin>>xi>>yi;
        if(xi>s || xi==s){
            flag++;

        }else if(xi<s){
            s+=yi;
        }
    }
    if(flag==0)
    cout<<"YES"<<endl;
    else if(flag>=1)
        cout<<"NO"<<endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   if(n!=1){
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    }
    if(n!=1){
    for(int i=0;i<n;i++){
    count++;
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    }
    }
    if(n==1){
        if(s>dragons[0]){
            cout<<"YES";
        }
    else
        cout<<"NO";
    }if(n!=1){
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   if(n!=1){
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    }

    for(int i=0;i<n;i++){
    count++;
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    }
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   for(int i=0;i<n;i++){
   for(int j=0;i<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    for(int i=0;i<n;i++){
    cout<<dragons[i]<<" ";
    }cout<<endl;
    for(int i=0;i<n;i++){
    cout<<bonus[i]<<" ";
    }cout<<endl;
    for(int i=0;i<n;i++){
    count++;
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    }
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   if(n!=1){
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    }
    if(n!=1){
    for(int i=0;i<n;i++){
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
           count++;
    }
    }
    }
    if(n==1){
        if(s>dragons[0]){
            cout<<"YES";
        }
    else
        cout<<"NO";
    }
    if(n!=1){
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   if(n!=1){
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    }
    if(n!=1){
    for(int i=0;i<n;i++){
    count++;
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    }
    }
    if(n==1){
        if(s>dragons[0]){
            cout<<"YES";
        }
    else
        cout<<"NO";
    }
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   if(n!=1){
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    }

    for(int i=0;i<n;i++){
    count++;
    if(s<dragons[i]){
            cout<<"NO";
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    }
    if(n!=1){
    if(count==n){
        cout<<"YES";
    }
    }
    if(n==1){
    if(s>dragons[0])
            cout<<"YES";
    }

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    long long int n,s,xi,yi,flag=0;
    cin>>s>>n;
    while(n--){
        cin>>xi>>yi;
        if(xi<s){
            s+=yi;
        }else
        flag++;
    }
    if(flag==0)
    cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   if(n!=1){
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    }

    for(int i=0;i<n;i++){
    count++;
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    }
    if(n!=1){
    if(count==n){
        cout<<"YES";
    }else
    cout<<"NO";
    }
    if(n==1){
        if(s>dragons[0])
            cout<<"YES";
    }else
    cout<<"NO";

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   if(n!=1){
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }
    }
    if(n!=1){
    for(int i=0;i<n;i++){
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    count++;
    }
    }
    if(n==1){
        if(s>dragons[0]){
            cout<<"YES";
        }
    else
        cout<<"NO";
    }
    if(n!=1){
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }
    }

    return 0;
}


#include<iostream>
using namespace std;

int main(void) {

    int s,n;
    cin >> s >> n;
    int dragons[n];
    int bonus[n];
    int totalBonus = 0;
    for (int i = 0; i < n; i++) {
        cin >> dragons[i];
        cin >> bonus[i];
        totalBonus += bonus[i];
    }
    int x = s;

    //sorting
    for (int i = 0; i < n-1; i++) {
        int temp2;
        int min = i;
        for (int j = i+1; j < n; j++) {
            if (dragons[min] > dragons[j]) {
                min = j;
            }
        }
        int temp1 = dragons[i];
        dragons[i] = dragons[min];
        dragons[min] = temp1;

        temp2 = bonus[i];
        bonus[i] = bonus[min];
        bonus[min] = temp2;
    }

    bool lost = false;
    for (int i = 0; i < n; i++) {
        if (s > dragons[i]) {
            s += bonus[i];
        } else {
            lost = true;
            break;
        }
    }

    if (lost)
        cout << "NO" << endl;
    else if (!lost && s == (x + totalBonus))
        cout << "YES" << endl;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   int s,n,count=0;
   cin>>s>>n;
   int* dragons = new int[n];
   int* bonus = new int[n];
   for(int i=0;i<n;i++){
    cin>>dragons[i]>>bonus[i];
    }
   for(int i=0;i<n;i++){
   for(int j=0;j<n;j++){
   if(dragons[j]>dragons[j+1]){
       int temp = dragons[j];
       dragons[j]= dragons[j+1];
       dragons[j+1]= temp;
       int tempb = bonus[j];
       bonus[j]= bonus[j+1];
       bonus[j+1]= tempb;
    }
    }
    }

    for(int i=0;i<n;i++){
    count++;
    if(s<dragons[i]){
            break;
        }
    if(s>dragons[i]){
        s+=bonus[i];
    }
    }
    if(count==n){
        cout<<"YES";
    }
    else{
        cout<<"NO";
    }

    return 0;
}


#include <bits/stdc++.h>
#define ff first
typedef long long ll;
#define ss second
#define pb push_back
#define mp make_pair
#define vll vector<long long>
#define vi vector<int>
#define vvi vector< vector<int> >
#define vvll vector< vector<long long> >
#define vpii vector< pair<int ,int> >
#define vpll vector< pair<long,long> >
#define all(v) v.begin(),v.end()

using namespace std;
bool myComparison1(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.second<b.second;
}
bool myComparison2(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.ff<b.ff;
}
bool mycom3(const pair<int,int> &p1, const pair<int,int> &p2)
{
        if(p1.ff> p2.ff) return true;
        if(p1.ff == p2.ff) return p1.second < p2.second;
        return false;
}

int main(){
    ll n,kl;
    cin >> n;
    vector< pair<int,int> > v;
    for (int i=0;i<n;i++){
       int c;
       cin >> c;
       v.push_back(make_pair(c,i));
    }
    sort(v.begin(),v.end());
    for (int i=0;i<n-1;i++){
        if (v[i+1].first <= v[i].first){
            v[i+1].ff = v[i].first + 1;
        }

    }
    sort(v.begin(),v.end(),myComparison1);

   for (int i=0;i<n;i++){
    cout << v[i].first << " ";
   }

}


#include <bits/stdc++.h>
#define ff first
typedef long long ll;
#define ss second
#define pb push_back
#define mp make_pair
#define vll vector<long long>
#define vi vector<int>
#define vvi vector< vector<int> >
#define vvll vector< vector<long long> >
#define vpii vector< pair<int ,int> >
#define vpll vector< pair<long,long> >
#define all(v) v.begin(),v.end()

using namespace std;
bool myComparison1(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.second<b.second;
}
bool myComparison2(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.ff<b.ff;
}
bool mycom3(const pair<int,int> &p1, const pair<int,int> &p2)
{
        if(p1.ff> p2.ff) return true;
        if(p1.ff == p2.ff) return p1.second < p2.second;
        return false;
}

int main(){
    ll n;
    cin >> n;
    vector< pair<int,int> > v;
    for (int i=0;i<n;i++){
       int c;
       cin >> c;
       v.push_back(make_pair(c,i));
    }
    sort(v.begin(),v.end());
    for (int i=0;i<n-1;i++){
        if (v[i+1].first <= v[i].first){
            v[i+1].ff = v[i].first + 1;
        }
        cout << v[i].ff << " " << v[i+1].ff << "\n";

    }
    sort(v.begin(),v.end(),myComparison1);

   for (int i=0;i<n;i++){
    cout << v[i].first << " ";
   }

}


#include <bits/stdc++.h>
#define ff first
typedef long long ll;
#define ss second
#define pb push_back
#define mp make_pair
#define vll vector<long long>
#define vi vector<int>
#define vvi vector< vector<int> >
#define vvll vector< vector<long long> >
#define vpii vector< pair<int ,int> >
#define vpll vector< pair<long,long> >
#define all(v) v.begin(),v.end()

using namespace std;
bool myComparison1(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.second<b.second;
}
bool myComparison2(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.ff<b.ff;
}
bool mycom3(const pair<int,int> &p1, const pair<int,int> &p2)
{
        if(p1.ff> p2.ff) return true;
        if(p1.ff == p2.ff) return p1.second < p2.second;
        return false;
}

int main(){
    ll n;
    cin >> n;
    vector< pair<int,int> > v;
    for (int i=0;i<n;i++){
       int c;
       cin >> c;
       v.push_back(make_pair(c,i));
    }
    sort(v.begin(),v.end());
    for (int i=0;i<n-1;i++){
        if (v[i+1].first <= v[i].first){
            v[i+1].ff++;
        }

    }
    sort(v.begin(),v.end(),myComparison1);

   for (int i=0;i<n;i++){
    cout << v[i].first << " ";
   }

}


#include <bits/stdc++.h>
#define ff first
typedef long long ll;
#define ss second
#define pb push_back
#define mp make_pair
#define vll vector<long long>
#define vi vector<int>
#define vvi vector< vector<int> >
#define vvll vector< vector<long long> >
#define vpii vector< pair<int ,int> >
#define vpll vector< pair<long,long> >
#define all(v) v.begin(),v.end()

using namespace std;
bool myComparison1(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.second<b.second;
}
bool myComparison2(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.ff<b.ff;
}
bool mycom3(const pair<int,int> &p1, const pair<int,int> &p2)
{
        if(p1.ff> p2.ff) return true;
        if(p1.ff == p2.ff) return p1.second < p2.second;
        return false;
}

int main(){
    ll n;
    cin >> n;
    vector< pair<int,int> > v;
    for (int i=0;i<n;i++){
       int c;
       cin >> c;
       v.push_back(make_pair(c,i));
    }
    sort(v.begin(),v.end());
    for (int i=0;i<n-1;i++){
        if (v[i+1].first <= v[i].first){
            v[i+1].ff = v[i].first + 1;
        }

    }
    sort(v.begin(),v.end(),myComparison1);

   for (int i=0;i<n;i++){
    cout << v[i].first << " ";
   }

}


#include <bits/stdc++.h>
#define ff first
typedef long long ll;
#define ss second
#define pb push_back
#define mp make_pair
#define vll vector<long long>
#define vi vector<int>
#define vvi vector< vector<int> >
#define vvll vector< vector<long long> >
#define vpii vector< pair<int ,int> >
#define vpll vector< pair<long,long> >
#define all(v) v.begin(),v.end()

using namespace std;
bool myComparison1(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.second<b.second;
}
bool myComparison2(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.ff<b.ff;
}
bool mycom3(const pair<int,int> &p1, const pair<int,int> &p2)
{
        if(p1.ff> p2.ff) return true;
        if(p1.ff == p2.ff) return p1.second < p2.second;
        return false;
}

int main(){
    ll n;
    cin >> n;
    vector< pair<int,int> > v;
    for (int i=0;i<n;i++){
       int c;
       cin >> c;
       v.push_back(make_pair(c,i));
    }
    sort(v.begin(),v.end());
    for (int i=0;i<n-1;i++){
        for (int j=i+1;j<n;j++){
            if (v[j].first == v[i].first){
                v[j].first++;
            }

        }

    }
    sort(v.begin(),v.end(),myComparison1);

   for (int i=0;i<n;i++){
    cout << v[i].first << " ";
   }

}


#include <bits/stdc++.h>
#define ff first
typedef long long ll;
#define ss second
#define pb push_back
#define mp make_pair
#define vll vector<long long>
#define vi vector<int>
#define vvi vector< vector<int> >
#define vvll vector< vector<long long> >
#define vpii vector< pair<int ,int> >
#define vpll vector< pair<long,long> >
#define all(v) v.begin(),v.end()

using namespace std;
/*bool myComparison1(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.second<b.second;
}
bool myComparison2(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.ff<b.ff;
}
bool mycom3(const P &p1, const P &p2)
{
        if(p1.ff> p2.ff) return true;
        if(p1.ff == p2.ff) return p1.second < p2.second;
        return false;
}*/

int main(){
    ll n;
    cin >> n;
    vector<int> v;
    for (int i=0;i<n;i++){
       int c;
       cin >> c;
       v.push_back(c);
    }
    sort(v.begin(),v.end());
    for (int i=0;i<n-1;i++){
        for (int j=i+1;j<n;j++){
            if (v[j] == v[i]){
                v[j]++;
            }

        }

    }
   for (int i=0;i<n;i++){
    cout << v[i] << " ";
   }

}


#include <iostream>
#include <string>
#include <cstring>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <list>
#include <fstream>
#define ull unsigned long long
#define ll long long
#define ld long double
#define pi 3.1415926536
#define lp(i,n,a) for(ll i=a;i<=n;i++)
#define pl(i,n) for(ll i=n-1;i>=0;i--)
#define w while
#define re return
using namespace std;
int n,x,last=1;
map<int,bool> m;
int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>x;
        if(m[x]){
            while(m[last])last++;
            cout<<last<<" ";
            m[last]=1;
        }
        else{m[x]=1;cout<<x<<" ";}
    }
    re 0;
}


#include <iostream>
#include <string>
#include <cstring>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <list>
#include <fstream>
#define ull unsigned long long
#define ll long long
#define ld long double
#define pi 3.1415926536
#define lp(i,n,a) for(ll i=a;i<=n;i++)
#define pl(i,n) for(ll i=n-1;i>=0;i--)
#define w while
#define re return
using namespace std;
int n,x,hna;
map<int,int> m,last;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>x;
        hna=x;
        if(last[x]!=0)
            hna=last[x];
        while(m[hna])hna++;
        cout<<hna<<" ";
        m[hna]=1;
        last[x]=hna;
    }
    re 0;
}


#include <iostream>
#include <string>
#include <cstring>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <list>
#include <fstream>
#define ull unsigned long long
#define ll long long
#define ld long double
#define pi 3.1415926536
#define lp(i,n,a) for(ll i=a;i<=n;i++)
#define pl(i,n) for(ll i=n-1;i>=0;i--)
#define w while
#define re return
using namespace std;
int n,x,last=1;
map<int,bool> m;
int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>x;
        while(m[x])x++;
        cout<<x<<" ";
        m[x]=1;
    }
    re 0;
}


#include <iostream>
#include <string>
#include <cstring>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <list>
#include <fstream>
#define ull unsigned long long
#define ll long long
#define ld long double
#define pi 3.1415926536
#define lp(i,n,a) for(ll i=a;i<=n;i++)
#define pl(i,n) for(ll i=n-1;i>=0;i--)
#define w while
#define re return
using namespace std;
int n,x,last=1;
bool m[300003];
int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>x;
        if(m[x]){
            while(m[last])last++;
            cout<<last<<" ";
            m[last]=1;
        }
        else{m[x]=1;cout<<x<<" ";}
    }
    re 0;
}


#include <iostream>
#include <string>
#include <cstring>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <list>
#include <fstream>
#define ull unsigned long long
#define ll long long
#define ld long double
#define pi 3.1415926536
#define lp(i,n,a) for(ll i=a;i<=n;i++)
#define pl(i,n) for(ll i=n-1;i>=0;i--)
#define w while
#define re return
using namespace std;
int n,x,last=1,f;
map<int,vector<int> > m;
int arr[300003];
int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>x;
        m[x].push_back(i);
    }
    map<int,vector<int> >::iterator it=m.begin(),en=m.end();
    while(it!=en){
        f=it->first;
        x=(it->second).size();
        //cout<<x<<endl;
        if(it->first>last)last=it->first;
        for(int i=0;i<x;i++){
            arr[m[f][i]]=last;
            last++;
        }
        it++;
    }
    for(int i=0;i<n;i++)cout<<arr[i]<<" ";cout<<endl;
    re 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    int n;
    cin>>n;
    vector< pair < ll, ll> >v;
    for(int i=0;i<n;i++)
    {
        ll a;
        cin>>a;
        v.push_back({a,i});
    }
    sort(v.begin(),v.end());
    ll a[n];
    a[v[0].second]=v[0].first;
    for(int i=1;i<n;i++)
    {
        if(v[i].first==v[i-1].first)
        {
            a[v[i].second]=v[i-1].first+1;
        }
        else
        a[v[i].second]=v[i].first;

    }
    for(int i=0;i<n;i++)
    cout<<a[i]<<" ";
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    int n;
    cin>>n;
    vector< pair < ll, ll> >v;
    for(int i=0;i<n;i++)
    {
        ll a;
        cin>>a;
        v.push_back({a,i});
    }
    sort(v.begin(),v.end());
    ll a[n];
    a[v[0].second]=v[0].first;
    for(int i=1;i<n;i++)
    {
        if(v[i].first==v[i-1].first)
        {
            a[v[i].second]=a[v[i-1].second]+1;
        }
        else
        a[v[i].second]=v[i].first;

    }
    for(int i=0;i<n;i++)
    cout<<a[i]<<" ";
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    int n;
    cin>>n;
    vector< pair < ll, ll> >v;
    for(int i=0;i<n;i++)
    {
        ll a;
        cin>>a;
        v.push_back({a,i});
    }
    sort(v.begin(),v.end());
    ll a[n];
    a[v[0].second]=v[0].first;
    ll max=1;

    for(int i=0;i<n;i++)
    {
        if(v[i].first<=max)
        {
        	a[v[i].second]=max;
        	max++;
        }
        else
        {
        	a[v[i].second]=v[i].first;
        	max=v[i].first+1;
        }

    }
    for(int i=0;i<n;i++)
    cout<<a[i]<<" ";
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    int n;
    cin>>n;
    vector< pair < ll, ll> >v;
    for(int i=0;i<n;i++)
    {
        ll a;
        cin>>a;
        v.push_back({a,i});
    }
    sort(v.begin(),v.end());
    ll a[n];
    a[v[0].second]=v[0].first;
    for(int i=1;i<n;i++)
    {
        if(v[i].first==v[i-1].first  )
        {

            a[v[i].second]=a[v[i-1].second]+1;
        }
        else if(v[i].first==a[v[i-1].second])
        a[v[i].second]=v[i].first+1;
        else
        a[v[i].second]=v[i].first;

    }
    for(int i=0;i<n;i++)
    cout<<a[i]<<" ";
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    scanf("%d",&n);
    map<long long ,int>m;
    int arr[n];
    for (int i=0;i<n;i++)
    {
        scanf("%d",&arr[i]);
        int y=arr[i];
        while(m[arr[i]+m[arr[i]]]!=0)
        {
            arr[i]=arr[i]+m[arr[i]];
        }
        long long x=arr[i]+m[arr[i]];
        m[y]=(x-y);
        printf("%lld ",x);
        m[arr[i]+m[arr[i]]]++;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin>>n;
    map<long long ,int>m;
    int arr[n];
    for (int i=0;i<n;i++)
    {
        cin>>arr[i];
        while(m[arr[i]+m[arr[i]]]!=0)
        {
            arr[i]=arr[i]+m[arr[i]];
        }
        cout<<arr[i]+m[arr[i]]<<" ";
        m[arr[i]+m[arr[i]]]++;
    }
    cout<<endl;
    return 0;
}


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

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin>>n;
    pair<int,int>arr[n],ar[n];
    for (int i=0;i<n;i++)
    {
        cin>>arr[i].first;
        arr[i].second=i;
    }
    sort(arr,arr+n);
    for (int i=0;i<n;i++)
    {
        if(i!=0)
        {
            if(arr[i-1].first>=arr[i].first)
            arr[i].first=arr[i-1].first+1;
        }
        ar[i].first=arr[i].second;
        ar[i].second=arr[i].first;
    }
    sort(ar,ar+n);
    for (int i=0;i<n;i++)
        cout<<ar[i].second<<" ";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    scanf("%d",&n);
    map<long long ,int>m;
    int arr[n];
    for (int i=0;i<n;i++)
    {
        scanf("%d",&arr[i]);
        while(m[arr[i]+m[arr[i]]]!=0)
        {
            arr[i]=arr[i]+m[arr[i]];
        }
        long long x=arr[i]+m[arr[i]];
        printf("%lld ",x);
        m[arr[i]+m[arr[i]]]++;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    map<long long ,int>m;
    int arr[n];
    for (int i=0;i<n;i++)
    {
        cin>>arr[i];
        while(m[arr[i]+m[arr[i]]]!=0)
        {
            arr[i]=arr[i]+m[arr[i]];
        }
        cout<<arr[i]+m[arr[i]]<<" ";
        m[arr[i]+m[arr[i]]]++;
    }
    cout<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

bool customS(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
    if(a.second==b.second)
        return a.first < b.first;
    return a.second < b.second;
}

bool customS2(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
    return a.first < b.first;
}

class CompareDist
{
public:
    bool operator()(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
        return a.first < b.first;
    }
};

int64_t gcd(int64_t a, int64_t b) {
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

double gcdfloat(double a, double b) {
    if (a < b)
        return gcd(b, a);

    if (fabs(b) < 0.001)
        return a;

    else
        return (gcd(b, a - floor(a / b) * b));
}

// vector< vector<int> > nodes(100);
// vector< int > visited(100, 0);
// vector< int > colors(200001, 0);
// queue<int> q;

// void DFS(int start, int *ctr=0){
//     // cout<<start<<" ";
//     visited[start] = 1;
//     *ctr = *ctr + 1;
//     // cout<<start<<" "<<*ctr<<"\n";
//     // int t = nodes[start].size();
//     // *max_degree = max(*max_degree, t);
//     // bool temp=false;
//     // cout<<start<<" "<<initial[start]<<" "<<after[start]<<"\n";
//     for(int i=0;i<nodes[start].size();i++){
//         if(visited[nodes[start][i]]==0){
//             DFS(nodes[start][i], ctr);
//         }
//     }
// }

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, i;
    cin>>n;
    vector<pair<int64_t, int64_t> > arr(n);
    for(i=0;i<n;i++){
        cin>>arr[i].second;
        arr[i].first = i;
    }
    sort(arr.begin(), arr.end(), customS);
    int ctr=arr[0].second;
    for(i=1;i<n;i++){
        if(arr[i].second>ctr){
            ctr = arr[i].second;
            ctr++;
        }
        else if(arr[i].second==ctr){
            arr[i].second = ctr+1;
            ctr+=2;
        }
        else{
            arr[i].second = ctr;
            ctr++;
        }
    }
    sort(arr.begin(), arr.end(), customS2);
    for(i=0;i<n;i++){
        cout<<arr[i].second<<" ";
    }
    cout<<"\n";
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

bool customS(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
    if(a.second==b.second)
        return a.first < b.first;
    return a.second < b.second;
}

bool customS2(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
    return a.first < b.first;
}

class CompareDist
{
public:
    bool operator()(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
        return a.first < b.first;
    }
};

int64_t gcd(int64_t a, int64_t b) {
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

double gcdfloat(double a, double b) {
    if (a < b)
        return gcd(b, a);

    if (fabs(b) < 0.001)
        return a;

    else
        return (gcd(b, a - floor(a / b) * b));
}

// vector< vector<int> > nodes(100);
// vector< int > visited(100, 0);
// vector< int > colors(200001, 0);
// queue<int> q;

// void DFS(int start, int *ctr=0){
//     // cout<<start<<" ";
//     visited[start] = 1;
//     *ctr = *ctr + 1;
//     // cout<<start<<" "<<*ctr<<"\n";
//     // int t = nodes[start].size();
//     // *max_degree = max(*max_degree, t);
//     // bool temp=false;
//     // cout<<start<<" "<<initial[start]<<" "<<after[start]<<"\n";
//     for(int i=0;i<nodes[start].size();i++){
//         if(visited[nodes[start][i]]==0){
//             DFS(nodes[start][i], ctr);
//         }
//     }
// }

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, i;
    cin>>n;
    vector<pair<int64_t, int64_t> > arr(n);
    for(i=0;i<n;i++){
        cin>>arr[i].second;
        arr[i].first = i;
    }
    sort(arr.begin(), arr.end(), customS);
    int ctr=1;
    for(i=0;i<n;i++){
        if(arr[i].second>ctr){
            ctr = arr[i].second;
            ctr++;
        }
        else if(arr[i].second==ctr){
            arr[i].second = ctr+1;
            ctr+=2;
        }
        else{
            arr[i].second = ctr;
            ctr++;
        }
    }
    sort(arr.begin(), arr.end(), customS2);
    for(i=0;i<n;i++){
        cout<<arr[i].second<<" ";
    }
    cout<<"\n";
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

bool customS(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
    if(a.second==b.second)
        return a.first < b.first;
    return a.second < b.second;
}

bool customS2(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
    return a.first < b.first;
}

class CompareDist
{
public:
    bool operator()(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
        return a.first < b.first;
    }
};

int64_t gcd(int64_t a, int64_t b) {
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

double gcdfloat(double a, double b) {
    if (a < b)
        return gcd(b, a);

    if (fabs(b) < 0.001)
        return a;

    else
        return (gcd(b, a - floor(a / b) * b));
}

// vector< vector<int> > nodes(100);
// vector< int > visited(100, 0);
// vector< int > colors(200001, 0);
// queue<int> q;

// void DFS(int start, int *ctr=0){
//     // cout<<start<<" ";
//     visited[start] = 1;
//     *ctr = *ctr + 1;
//     // cout<<start<<" "<<*ctr<<"\n";
//     // int t = nodes[start].size();
//     // *max_degree = max(*max_degree, t);
//     // bool temp=false;
//     // cout<<start<<" "<<initial[start]<<" "<<after[start]<<"\n";
//     for(int i=0;i<nodes[start].size();i++){
//         if(visited[nodes[start][i]]==0){
//             DFS(nodes[start][i], ctr);
//         }
//     }
// }

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, i;
    cin>>n;
    vector<pair<int64_t, int64_t> > arr(n);
    for(i=0;i<n;i++){
        cin>>arr[i].second;
        arr[i].first = i;
    }
    sort(arr.begin(), arr.end(), customS);
    int ctr=1;
    for(i=0;i<n;i++){
        if(arr[i].second>ctr){
            ctr = arr[i].second;
        }
        else{
            arr[i].second = ctr;
            ctr++;
        }
    }
    sort(arr.begin(), arr.end(), customS2);
    for(i=0;i<n;i++){
        cout<<arr[i].second<<" ";
    }
    cout<<"\n";
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

bool customS(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
    if(a.second==b.second)
        return a.first < b.first;
    return a.second < b.second;
}

bool customS2(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
    return a.first < b.first;
}

class CompareDist
{
public:
    bool operator()(pair<int64_t, int64_t> a, pair<int64_t, int64_t> b){
        return a.first < b.first;
    }
};

int64_t gcd(int64_t a, int64_t b) {
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

double gcdfloat(double a, double b) {
    if (a < b)
        return gcd(b, a);

    if (fabs(b) < 0.001)
        return a;

    else
        return (gcd(b, a - floor(a / b) * b));
}

// vector< vector<int> > nodes(100);
// vector< int > visited(100, 0);
// vector< int > colors(200001, 0);
// queue<int> q;

// void DFS(int start, int *ctr=0){
//     // cout<<start<<" ";
//     visited[start] = 1;
//     *ctr = *ctr + 1;
//     // cout<<start<<" "<<*ctr<<"\n";
//     // int t = nodes[start].size();
//     // *max_degree = max(*max_degree, t);
//     // bool temp=false;
//     // cout<<start<<" "<<initial[start]<<" "<<after[start]<<"\n";
//     for(int i=0;i<nodes[start].size();i++){
//         if(visited[nodes[start][i]]==0){
//             DFS(nodes[start][i], ctr);
//         }
//     }
// }

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, i;
    cin>>n;
    vector<pair<int64_t, int64_t> > arr(n);
    for(i=0;i<n;i++){
        cin>>arr[i].second;
        arr[i].first = i;
    }
    sort(arr.begin(), arr.end(), customS);
    int ctr=1;
    for(i=0;i<n;i++){
        if(arr[i].second>ctr){
            ctr = arr[i].second;
            ctr++;
        }
        else{
            arr[i].second = ctr;
            ctr++;
        }
    }
    sort(arr.begin(), arr.end(), customS2);
    for(i=0;i<n;i++){
        cout<<arr[i].second<<" ";
    }
    cout<<"\n";
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool chk(pair<ll,ll>a,pair<ll,ll>b)
{
    if(a.second<b.second)
        return true;
    else
        a.first<b.first;
}
int main()
{
    ll n;
    cin>>n;
    vector<pair<ll,ll> >v(n);
    for(ll i=0;i<n;i++)
    {
        cin>>v[i].first;
        v[i].second=i;
    }
    sort(v.begin(),v.end());
    for(ll i=1;i<n;i++)
    {
        if(v[i].first<=v[i-1].first)
        {
            v[i].first=v[i-1].first+1;
        }
    }
    sort(v.begin(),v.end(),chk);
    for(ll i=0;i<n;i++)
        cout<<v[i].first<<" ";
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n;
    cin>>n;
    vector<pair<ll,ll> >v;
    ll x;
    for(ll i=0;i<n;i++)
    {
        cin>>x;
        v.push_back({x,i+1});
    }
    sort(v.begin(),v.end());
    set<ll>s;
    ll ans[n+1];
    for(ll i=0;i<n;i++)
    {
        if(s.find(v[i].first)==s.end())
        {
            ans[v[i].second] = v[i].first;
            s.insert(v[i].first);
        }
        else
        {
            ans[v[i].second] = v[i].first+1;
            s.insert(v[i].first+1);
        }
    }
    for(ll i=1;i<=n;i++)
    {
        cout<<ans[i]<<" ";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n;
    cin>>n;
    vector<pair<ll,ll> >v;
    ll x;
    for(ll i=0;i<n;i++)
    {
        cin>>x;
        v.push_back({x,i+1});
    }
    sort(v.begin(),v.end());
    set<ll>s;
    set<ll>::iterator it;
    ll ans[n+1];
    for(ll i=0;i<n;i++)
    {
        if(s.find(v[i].first)==s.end())
        {
            ans[v[i].second] = v[i].first;
            s.insert(v[i].first);
        }
        else
        {
            it = s.end();
            it--;
            ans[v[i].second] = *it+1;
            s.insert(*it+1);
        }
    }
    for(ll i=1;i<=n;i++)
    {
        cout<<ans[i]<<" ";
    }
    return 0;
}


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

int main()
{
	int n;
	cin>>n;
	//n=200000;
	ll a[n];
	vector<ll>go;
	map<ll,ll>mp;
	map<ll,bool>c;

	for(int i=0; i<n; i++)
	{
		cin>>a[i];
		//a[i]=1000000000;
		mp[a[i]]=a[i];
	}
	for(int i=0; i<n; i++)
	{
		ll f=a[i];
		while(c[mp[f]])
		{
			mp[f]++;
		}
		go.push_back(mp[f]);
		c[mp[f]]=1;
		mp[f]++;
		//mp[mp[f]]++;
	}
	for(int i=0; i<go.size();i++)
	{
		cout<<go[i];
		if(i!=go.size()-1)
			cout<<" ";
	}
	cout<<endl;
}


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

int main()
{
	int n;
	cin>>n;
	//n=200000;
	ll a[n];
	vector<ll>go;
	map<ll,ll>mp;

	for(int i=0; i<n; i++)
	{
		cin>>a[i];
		//a[i]=1000000000;
		mp[a[i]]=a[i];
	}
	for(int i=0; i<n; i++)
	{
		ll f=a[i];
		go.push_back(mp[f]);
		mp[f]++;
	}
	for(int i=0; i<go.size();i++)
	{
		cout<<go[i];
		if(i!=go.size()-1)
			cout<<" ";
	}
	cout<<endl;
}


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

int main()
{
	int n;
	cin>>n;
	ll a[n];
	vector<ll>go;
	map<ll,bool>mp;
	for(int i=0; i<n; i++)
	{
		cin>>a[i];
		ll f=a[i];
		if(mp[f])
		{
			while(mp[f])
			{
				f++;
			}
		}
		mp[f]=1;
		go.push_back(f);
	}
	for(int i=0; i<go.size();i++)
	{
		cout<<go[i];
		if(i!=go.size()-1)
			cout<<" ";
	}
	cout<<endl;
}


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

struct san{
	ll first,second,idx;
};

bool banding(const san &a, const san &b)
{
	return a.first<b.first;
}
bool indeks(const san &a, const san &b)
{
	return a.idx<b.idx;
}

int main()
{
	int n;
	cin>>n;
	//n=200000;
	san a[n];
	for(int i=0; i<n; i++)
	{
		cin>>a[i].first;
		a[i].second=a[i].first;
		a[i].idx=i;
	}
	sort(a,a+n,banding);
	for(int i=1;i<n; i++)
	{
		a[i].second=max(a[i].second,a[i-1].second+1);
	}
	sort(a,a+n,indeks);
	for(int i=0; i<n; i++)
	{
		cout<<a[i].second<<" ";
	}
	cout<<endl;

}


#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define per(i, a, b) for(int i = b-1; i>=a ; i--)
#define trav(a, x) for(auto& a : x)
#define allin(a , x) for(auto a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define endl "\n"
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb(x) push_back(x)
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<ll> vl;
typedef vector<pii> vpi;
typedef pair<ll,ll> pll;
typedef vector<string> vs;
typedef vector<pll> vpl;
typedef vector<int> vi;
#define int long long
inline ll mod(ll n, ll m){ ll ret = n%m; if(ret < 0) ret += m; return ret; }
ll gcd(ll a, ll b){return (b == 0 ? a : gcd(b, a%b));}
ll exp(ll a,ll b,ll m){
    if(b==0LL) return 1LL;
    if(b==1LL) return mod(a,m);
    ll k = mod(exp(a,b/2,m),m);
    if(b&1LL){
        return mod(a*mod(k*k,m),m);
    }
    else return mod(k*k,m);

}

const int N = 300100;
int b[N];

int32_t main(){
  fastio;
  int n;
  cin>>n;
  map<int,vector<int> > mp;

  for(int i=0;i<n;i++){
    int a;
    cin>>a;
    mp[a].pb(i);
  }

  for(map<int,vector<int> >::iterator it = mp.begin();it!=mp.end();it++){
    int cur = it->first;
    vector<int> v = it->second;
    if(v.size()==0)continue;
    b[v.back()] =cur;
    v.pop_back();
    vector<int> v2 = mp[cur+1];
    if(v2.size() < v.size()){
      for(int x : v2){
        v.pb(x);
      }
      mp[cur+1 ] = v;
    }else{
      for(int x : v){
        v2.pb(x);
      }
      mp[cur+1] = v2;
    }

    mp[cur] = vector<int>();
  }

  for(int i=0;i<n;i++)cout<<b[i]<<" ";
    cout<<endl;
  // Math -> gcd it all // check MAXN // check ll
  //did you check N=1? Did you mix up N,M?
}