#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<pair<int,int>> E;
vector<pair<int,int>> E2;
int ptr[100007];
int in[100007];
int out[100007];
int N;
vector<int> G[100007];
deque<int> Q;
int used[100007];
int dfs(int v,int p = -1){
    if(v != 1 and used[v]) return 0;
    used[v] = 1;
    Q.push_back(v);
    if(v == 1 and Q.size() == N+1){
        return 1;
    }
    else if(v == 1 and p!=-1){
        Q.pop_back();
        return 0;
    }
    for (auto to:G[v]) {
        if(dfs(to,1)) return 1;
    }
    Q.pop_back();
    used[v] = 0;
    return 0;
}
inline void solve(){
    int n,m;
    cin >> n >> m;
    for (int i = 0; i < m; ++i) {
        int u,v;
        cin >> u >> v;
        in[v]++;
        out[u]++;
        E.push_back({u,v});
    }
    if(n > 80000){
        int cnt = 0;
        for (int i = 0; i <= n; ++i) {
            //cout << in[i] << " " << out[i] << "\n";
        }
        for (int i = 0; i < E.size(); ++i) {
            int u = E[i].first;
            int v = E[i].second;
            if(out[u] > in[u] and in[v] > out[v]){
                cnt++;
                out[u]--;
                in[v]--;
            }
            else{
                E2.push_back(E[i]);
            }
        }
        for (int i = 0; i < E2.size(); ++i) {
            //cout << E2[i].first << " " << E2[i].second << "\n";
        }
        if(m-cnt > n) E2.erase(E2.begin()),cnt++;
        for (int i = 0; i < E2.size(); ++i) {
            int u = E2[i].first;
            int v = E2[i].second;
            if(out[u] > in[u] and in[v] > out[v]){
                cnt++;
                out[u]--;
                in[v]--;
            }
            else{
                G[u].push_back(v);
            }
        }
        if(m-cnt != n){
            cout << "NO\n";
            return;
        }
        for (int i = 0; i <= n; ++i) {
            if(in[i] != out[i]){
                cout << "NO\n";
                return;
            }
        }
        vector<int> ans;
        int p = 1;
        for (int i = 0; i <= n+5; ++i) {
            ans.push_back(p);
            if(ptr[p] == G[p].size()) break;
            int t = G[p][ptr[p]++];
            p = t;
        }
        if(ans.size() != n+1){
            cout << "NO\n";
            return;
        }
        cout << "YES\n";
        for (int i = 0; i < ans.size(); ++i) {
            cout << ans[i] << " ";
        }
        cout << "\n";
        return;
    }else{
        for (int i = 0; i < E.size(); ++i) {
            int u = E[i].first;
            int v = E[i].second;
            G[u].push_back(v);
        }
        N = n;
        dfs(1);
        if(Q.size() != n+1){
            cout << "NO\n";
            return;
        }
        cout << "YES\n";
        for (int i = 0; i < Q.size(); ++i) {
            cout << Q[i] << " ";
        }
        cout << "\n";
    }

}
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int t = 1;
    //cin >> t;
    while (t--) solve();
    return 0;
}


// D - ейлеровый цикл -80 балов
