#include <bits/stdc++.h>
using namespace std;
//typedef long long int;
vector <int> e[100040];
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n,m;
    cin>>n>>m;
    
    for (int i=0;i<m;i++)
    {
        int r,l;
        cin>>l>>r;
        e[l].push_back(r);
    }
    vector <int> v;
    for (int i=2;i<=n;i++)
    {
        v.push_back(i);
    }
    for (int q=1;q<30000000;q++)
    {
        bool f=1;
        for (int i=1;i<v.size();i++)
        {
            if (!count(e[v[i-1]].begin(),e[v[i-1]].end(),v[i])) {i=n;f=0;}
        }
        if (f)
        {
            if (count(e[1].begin(),e[1].end(),v[0]) && count(e[v[v.size()-1]].begin(),e[v[v.size()-1]].end(),1)) 
            {
                cout<<"YES\n1 ";
                for (int i=0;i<v.size();i++)
                    cout<<v[i]<<" ";
                cout<<1<<endl;
                return 0;
            }
        }
        next_permutation(v.begin(),v.end());
    }
    cout<<"NO\n";
}

