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

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

	int n,m;
	cin>>n>>m;
    if(n<15){
    int arr[n][n];
    for(int i = 0; i <n; i += 1){
        for(int j = 0; j < n;j += 1){
            arr[i][j] = 0;
        }
    }
    for(int i = 0;i<m; i += 1){
        int a,b;
        cin>>a>>b;
        arr[a-1][b-1]=1;
    }
    int way[n];
    int fact = 1;
    for(int i = 0; i <n; i+= 1){
        way[i] = i;
        fact*=i+1;
    }
    for(int z = 0;z<fact; z+=1){
        bool t = 1;
        for(int j = 0; j<n;j+=1){
            if(arr[way[j]][way[(j+1)%n]]==0)t=0;
        }
        if(t == 1){
            cout<<"YES\n";
            for(int i = 0; i <n;i+=1)cout<<way[i]+1<<' ';
            cout<<1;
            return 0;
        }
        next_permutation(way,way+n);
    }
    }
    cout<<"NO\n";
}
