#include <bits/stdc++.h>

using namespace std;
vector<int> g[100005], g1[100005];
int s1[100005], s2[100005];
bool used[100005];
bool f= false;
int cnt = 0;
vector<int> ans;
vector<int> c;
int n,m;

int ans1[100005], ans2[100005];
void dfs(int v)
{
    used[v] = true;
    cnt ++;
    c.push_back(v);
    if(ans1[v] == 1)
    {
        if(cnt == n && f == false)
        {
            for(int j = 0; j<c.size(); j++)
            {
                ans.push_back(c[j]);
            }
            f = true;
        }
    } else
    if(ans1[v] != 0)
        dfs(ans1[v] - 1);
    else
    for(int i = 0; i < g[v].size(); i++){
        int to = g[v][i];
        if(cnt == n && to == 0 && f == false)
        {
            for(int j = 0; j<c.size(); j++)
            {
                ans.push_back(c[j]);
            }
            f = true;
        } else if(used[to] == false && f == false && (ans1[v] == to+1 || ans1[v] == 0) && (ans2[to]==v+1 || ans2[to] == 0)) dfs(to);
    }
    c.erase(c.end()-1);
    used[v] = false;
    cnt --;

}
int main()
{
   ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
   cin>>n>>m;
   int a ,b;
   for(int i = 0; i < m; i ++)
   {
       cin>>a>>b;
       a--;
       b--;
       g[a].push_back(b);
       s1[a]++;
       s2[b]++;
       g1[b].push_back(a);
   }
   for(int i =0; i<n; i ++){
    if(s1[i] == 0 || s2[i] == 0)
   {
       cout<<"NO";
       return 0;
   }
   if(s1[i] == 1)
   {
       if(ans1[i] == 0 || ans1[i] == g[i][0] + 1)
       ans1[i] = g[i][0] + 1;
       else {cout<<"NO"; return 0;}
       if(ans2[g[i][0]] == 0 || ans2[g[i][0]] == i +1)
       ans2[g[i][0]] = i+1; else {cout<<"NO"; return 0;}
   }
   if(s2[i] == 1)
   {
       if(ans2[i] == 0 || ans2[i] == g1[i][0] + 1)
       ans2[i] = g1[i][0] + 1;
       else {cout<<"NO"; return 0;}
       if(ans1[g1[i][0]] == 0 || ans1[g1[i][0]] == i +1)
       ans1[g1[i][0]] = i+1; else {cout<<"NO"; return 0;}
   }
   }

   dfs(0);
   if(f == false)
    cout<<"NO\n";
   else {
    cout<<"YES\n";
    for(int i = 0; i < n; i ++)
        cout<<ans[i] + 1 <<' ';
    cout<<1;
   }
}

