//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define ll long long
#define ull unsigned ll
#define ff first
#define ss second
//#define int long long
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
#define pii pair <int, int>
using namespace std;
using namespace __gnu_pbds;
template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;
const ll inf = 1e18;
constexpr ll mod = 998244353;
const int MAXN = 1e5+10;

int c[25][25];
vector < vector <int> > g(MAXN);
vector <int> u(MAXN);
int n, m;

void dfs1(int v){
	u[v] = 1;
	for (auto to : g[v])
		if (!u[to]) dfs1(to);
}

void dfs(int v, set <int> &s, vector <int> &a){
	if (s.size() == n){
		cout << "YES\n";
		for (auto i : a) cout << i + 1 << " ";
		cout << 1;
		exit(0);
	}
	for (auto to : g[v]){
		if (!s.count(to)){
			a.pb(to);
			s.insert(to);
			dfs(to, s, a);
			a.pop_back(to);
			s.erase(to);
		}
	}
}

void solve(){
	cin >> n >> m;
	for (int i = 1; i <= m; ++i){
		int a, b; cin >> a >> b; --a; --b;
		g[a].pb(b);
		if (a < 25 && b < 25) c[a][b] = 1;
	}
	
	dfs1(0);
	for (int i = 0; i < n; ++i)
		if (!u[i]){
			cout << "NO";
			return;
		}
	if (n == m){
		if (g[0].empty()){
			cout << "NO";
			return;
		}
		vector <int> ans = {1};
		int v = g[0][0];
		for (; v != 0; v = g[v][0]){
			if (g[v].empty()){
				cout << "NO";
				return;
			}
			ans.pb(v+1);
		}
		ans.pb(1);
		cout << "YES\n";
		for (auto i : ans) cout << i << " ";
		return;
	}
	
	if (m - n <= 7){
		dfs(0, set <int>(), vector <int>());
		cout << "NO";
		return;
	}
	if (n > 20){
		cout << "NO";
		return;
	}
	
	vector < vector <char> > dp((1 << n), vector <char> (n, 100));
	dp[1][0] = 0;
	for (int i = 3; i < (1 << n); i += 2){
		for (int v = 1; v < n; ++v){
			if ((1 << v) + 1 == i){
				dp[i][v] = 1;
				continue;
			}
			if (! (i & (1 << v))) continue;
			for (int t = 0; t < n; ++t){
				if (t == v) continue;
				if (! (i & (1 << t))) continue;
				if (!c[t][v]) continue;
				if (dp[i][v] > dp[i ^ (1 << v)][t] + 1) dp[i][v] = dp[i ^ (1 << v)][t] + 1;
			}
		}
	}
	
	int last = -1;
	for (int v = 1; v < n; ++v)
		if (dp[(1 << n) - 1][v] == n-1 && c[v][0]){
			last = v;
			break;
		}
	if (last == -1){
		cout << "NO";
		return;
	}
	
	vector <int> ans = {1};
	int mask = (1 << n) - 1;
	while (mask > 0){
		ans.pb(last+1);
		mask -= (1 << last);
		for (int i = 0; i < n; ++i)
			if ((mask & (1 << i)) && dp[mask][i] < 100){
				if (c[i][last]){
					last = i;
					break;
				}
			}
	}
	
	cout << "YES\n";
	reverse(all(ans));
	for (auto i : ans) cout << i << " ";
}
 
signed main(){
    ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    solve();
}