#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long n, m;
pair<int, int> p[maxn];
pair<int, int> findpos() {
  int a, b, c = 0;
  pair<int, int> res;
  for (a = 1; a <= n; a++) {
    for (b = a + 1; b <= n; b++) {
      if ((res = make_pair(a, b)) != p[++c]) return res;
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1, a, b; i <= m; i++) {
    scanf("%d%d", &a, &b);
    p[i] = make_pair(min(a, b), max(a, b));
  }
  if (n * (n - 1) / 2 <= m) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  sort(p + 1, p + 1 + m);
  pair<int, int> pos = findpos();
  for (int i = 1, cnt = 0; i <= n; i++) {
    if (i == pos.first)
      printf("%d ", n - 1);
    else if (i == pos.second)
      printf("%d ", n);
    else
      printf("%d ", ++cnt);
  }
  printf("\n");
  for (int i = 1, cnt = 0; i <= n; i++) {
    if (i == pos.first)
      printf("%d ", n);
    else if (i == pos.second)
      printf("%d ", n);
    else
      printf("%d ", ++cnt);
  }
  printf("\n");
  return 0;
}
