#include <bits/stdc++.h>

#define INF 1000000005
#define INFL 1000000000000000005ll
#define EPS 1e-6
#define pb push_back
#define pause system("pause")
#define exit exit(0)
#define endl '\n'

using namespace std;
using ull = unsigned long long;
using ll = long long;

typedef pair<ll, ll> pii;
const int N = 100005, MOD = 998244353;

int n, m, hd, p[N];
vector<int> g[N];
char vis[N], to1[N];

void dfs(int u) {
	vis[u] = 1;
	p[hd++] = u;
	if (hd == n) {
		if (!to1[u]) {
			vis[u] = 0, --hd;
			return;
		}

		cout << "YES" << endl;
		for (int i = 0; i <= n; ++i) {
			cout << p[i % n] << ' ';
		}
		cout << endl;
		//pause;
		exit;
	}

	for (auto v : g[u]) {
		if (!vis[v]) {
			dfs(v);
		}
	}

	vis[u] = 0, --hd;
}

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

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

	cin >> n >> m;
	vector<char> inE(n + 1);
	for (int i = 0, u, v; i < m; ++i) {
		cin >> u >> v;
		g[u].pb(v);
		inE[v] = 1;
		if (v == 1) to1[u] = 1;
	}
	
	for (int i = 1; i <= n; ++i) {
		if (g[i].size() == 0 || !inE[i]) {
			cout << "NO" << endl;
			return 0;
		}

		shuffle(g[i].begin(), g[i].end(), rng);
	}

	dfs(1);

	cout << "NO" << endl;
	//pause;
	return 0;
}
