#include <iostream>

using namespace std;

int main()
{
   long long n, m;
   cin>>n>>m;
   int m1=m;
   while(m1--)
   {
       int a, b;
       cin>>a>>b;
   }
   if(n==2) {cout<<"YES"<<endl;
   cout<<1<<' '<<2<<' '<<2<<' '<<1;} else
   if(n==1){cout<<"YES"<<endl;
   cout<<1;} 
   else 
   {
       cout<<"NO";
   } 
   

}
