stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<iostream>

#include<cstdio>

using namespace std;

typedef long long ll;

const int maxn = 1e6+6;

int main()

{

	ll x;

	scanf("%lld",&x);

	ll sum = 100;

	ll ji = 0;

	while(sum < x)

	{

		ji ++;

		sum += sum/100;

	}

	printf("%lld\n",ji);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.0986060559023505x):
#include<stdio.h>

int main()

{

	long long int n,m;

	int t=0;

	m=100;

	scanf("%lld",&n);

	while(m<n)

	{

		m=m*1.01;

		t++;

	}

	printf("%d",t);

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define IO ios::sync_with_stdio(0), cin.tie(0) 

using namespace std;

typedef long long ll;

const int maxn = 1e5 + 5;

const int inf = ~0u >> 1;

int main() {

    IO;

    ll x;

    cin >> x;

    ll sum = 100;

    int ans = 0;

    while (sum < x) {

        sum += ll(0.01 * sum);

        ans++;

    }

    cout << ans << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2418640614778385x):
#include<stdio.h>

int main()

{

	long long int n,m;

	int t=0;

	m=100;

	scanf("%lld",&n);

	while(m<n)

	{

		m=m*1.01;

		t++;

	}

	printf("%d",t);

}
// Slower C++ solution:
 #include<iostream>

 #include<algorithm>

 #include<cmath>

 #include<iomanip>

 #include<string.h>

 #include<cmath>

 #include<map>

 #include<vector>

using namespace std;

typedef long long ll;

char s[4005];

int main()

{

ll x;

cin>>x;

ll mmid=100;

for(int i=1;;i++)

{

  mmid=(ll)(1.0*mmid*1.01);  

//    cout<<mmid<<endl;

    if(mmid>=x)

    {

        cout<<i;

        break;

    }

}



}


// Faster C++ solution for the same problem (measured speedup: 5.1606430026114705x):
#include<stdio.h>

int main()

{

	long long int n,m;

	int t=0;

	m=100;

	scanf("%lld",&n);

	while(m<n)

	{

		m=m*1.01;

		t++;

	}

	printf("%d",t);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main() {

	ll x,ans,cnt=0;

	cin>>x; ans=100;

	while (ans<x) {

		ans=ans*1.01;

		cnt++;

	}

	cout<<cnt<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.167006264239458x):
#include<stdio.h>

int main()

{

	long long int n,m;

	int t=0;

	m=100;

	scanf("%lld",&n);

	while(m<n)

	{

		m=m*1.01;

		t++;

	}

	printf("%d",t);

}
// Slower C++ solution:
#include<iostream>



using namespace std;



int main(){

    long long int a,x;

    int y=0;

    cin>>x;

    a=100;

    while(a<x){

        a+=a/100;

        y++;

    }

    cout<<y<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.159212859332068x):
#include<stdio.h>

int main()

{

	long long int n,m;

	int t=0;

	m=100;

	scanf("%lld",&n);

	while(m<n)

	{

		m=m*1.01;

		t++;

	}

	printf("%d",t);

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define eps 1e-3

#define pi acos(-1.0)

#define inf 0x3f

#define INF 0x3f3f3f3f

#define pb push_back

#define debug1 cout<<"&&";

#define debug2 cout<<"**";

#define ms(a, x) memset(a, x, sizeof(a))

#define for0(i, n) for(int i = 0; i < n; ++i)

#define for1(i, n) for(int i = 1; i <= n; ++i)

using namespace std;

typedef double db;

typedef long long ll;

typedef unsigned long long ull;

typedef pair<int, int> pii;

typedef pair<long long, int> pli;

typedef pair<long long, long long> pll;

const int mod = 1e9 + 7;

const int N = 1e5+10;

const int M = 1e6+10;

/*=================================================================================*/



int main() {

   ll end, st = 100, ans;

   cin>>end;

   for(int i = 1; st < end; ++i) {

      st = 1.01*st;

      ans = i;

   }

   cout<<ans;

}

// Faster C++ solution for the same problem (measured speedup: 5.15775353567316x):
#include<stdio.h>

int main()

{

	long long int n,m;

	int t=0;

	m=100;

	scanf("%lld",&n);

	while(m<n)

	{

		m=m*1.01;

		t++;

	}

	printf("%d",t);

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cstring>

#include <algorithm>

using namespace std;

typedef long long ll;



int main()

{

	ll X;

	cin >> X;

	ll sum = 100;

	int cnt = 0;

	while(sum < X)

	{

		sum += sum * 0.01;

		cnt++;

	}

	printf("%d",cnt);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.114905825345499x):
#include<stdio.h>

int main()

{

	long long int n,m;

	int t=0;

	m=100;

	scanf("%lld",&n);

	while(m<n)

	{

		m=m*1.01;

		t++;

	}

	printf("%d",t);

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long int  ll;

const ll mod = 1e9+7;

const ll mod1 = 998244353;

#define rep(i,a,b) for(ll i=a;i<b;i++)



void swap(ll &a , ll &b){

    ll t = a;

    a = b;

    b = t;

}



ll min(ll a, ll b){

    if(a<b)return a;

    return b;

}



ll max(ll a, ll b){

    if(a>b)return a;

    return b;

}



 ll pow(ll a, ll b) {

    a %= mod;

    ll ans = 1;

    while (b > 0) {

        if (b & 1)

            ans = ans * a % mod;

        a = a * a % mod;

        b /= 2;

    }

    return ans;

 }



 int n;

 int visited[102] = {0};

int x[102], y[102];



void dfs(int i)

{

    visited[i] = 1;

    for(int j=0; j<n; j++)

    {

        if(x[j] == x[i] || y[j]==y[i] )

        {

            if(visited[j] == 0)

            {

                dfs(j);

            }

        }

    }

}



int main(){



   ios_base :: sync_with_stdio(0);

   cin.tie(0);



   ll x;

   cin>>x;



   ll p =100;

   ll y = 0;

   while(p<x)

   {

       y++;

       p += 0.01 * p;

   }



   cout<<y<<endl;

    return 0;



}


// Faster C++ solution for the same problem (measured speedup: 5.246436683728394x):
#include<stdio.h>

int main()

{

	long long int n,m;

	int t=0;

	m=100;

	scanf("%lld",&n);

	while(m<n)

	{

		m=m*1.01;

		t++;

	}

	printf("%d",t);

}
// Slower C++ solution:
#include<iostream>

#include<cmath>

using namespace std;

typedef long long ll;





int main(){

	ll yu = 100;

	ll x;

	cin>>x;

	int ans = 0;

	while(yu < x)

	{

		yu += yu * 0.01;

		ans++;

	}

	

	cout<<ans<<endl;

	

	return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.122473395681686x):
#include<cstdio>

#define k 0.01

using namespace std;

typedef long long ll; 

int main()

{

	ll m = 100LL;

	ll x;

	int ans = 0;

	scanf("%lld",&x);

	while(m < x)

	{

		m += m*k;

		ans++;

	}

	printf("%d\n",ans);

}
// Slower C++ solution:
#include<iostream>

#include<cmath>

using namespace std;

typedef long long ll;





int main(){

	ll yu = 100;

	ll x;

	cin>>x;

	int ans = 0;

	while(yu < x)

	{

		yu += yu * 0.01;

		ans++;

	}

	

	cout<<ans<<endl;

	

	return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.221168411316718x):
#include <stdio.h>

int main ()

{

	long long x,i;

	int ans = 0;	

	scanf ("%lld",&x);

	for (i = 100; i < x;ans++)

	{

		i = i+i/100;

	}

	printf ("%d",ans);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<int, int> P;

using Graph = vector<vector<int>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

#define Rep(i, k, n) for (int i = k; i < (int)(n); i++)

const long long INF = 1LL << 60;

const int MOD = 1000000007;

const int dx[4] = {1, 0, -1, 0};

const int dy[4] = {0, 1, 0, -1};



vector<int> g[100010];



int main()

{

    int n, m;

    cin >> n >> m;

    rep(i, m)

    {

        int s, t;

        cin >> s >> t;

        g[s].push_back(t);

        g[t].push_back(s);

    }

    queue<int> q;

    vector<int> dist(n + 1, -1);

    vector<int> pre(n + 1, -1);

    dist[0] = 0;

    q.push(1);



    while (!q.empty())

    {

        int v = q.front();

        q.pop();

        for (int u : g[v])

        {

            if (dist[u] != -1)

                continue;

            dist[u] = dist[v] + 1;

            pre[u] = v;

            q.push(u);

        }

    }



    cout << "Yes" << endl;

    Rep(i, 2, n + 1)

    {

        int ans = pre[i];

        cout << ans << endl;

    }

}

// Faster C++ solution for the same problem (measured speedup: 3.491371244661582x):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<int, int> P;

using Graph = vector<vector<int>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

#define Rep(i, k, n) for (int i = k; i < (int)(n); i++)

#define RRep(i, k, n) for (int i = k; i > (int)(n); i--)

#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

//#define coutyn(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

#define ALL(a)  (a).begin(),(a).end()

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const long long INF = 1LL << 60;

const int MOD = 1000000007;

const double PI = acos(-1); //3.14~

const int dx[4] = {1, 0, -1, 0};

const int dy[4] = {0, 1, 0, -1};



int main()

{

    int n, m; cin >> n >> m;

    Graph g(n + 1);

    rep(i, m)

    {

        int a, b;

        cin >> a >> b;

        g[a].push_back(b);

        g[b].push_back(a);

    }



    queue<int> q;

    vector<int> dist(n + 1, -1);

    vector<int> pre(n + 1, -1);

    dist[0] = 0;

    q.push(1);

    while(!q.empty())

    {

        int v = q.front();q.pop();

        for(auto it : g[v])

        {

            if (dist[it] != -1) continue;

            dist[it] = dist[v] + 1;

            pre[it] = v;

            q.push(it);

        }

    }



    cout << "Yes" << endl;

    Rep(i, 2, n + 1)

    {

        int ans = pre[i];

        cout << ans << endl;

    }

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<int, int> P;

using Graph = vector<vector<int>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

#define Rep(i, k, n) for (int i = k; i < (int)(n); i++)

const long long INF = 1LL << 60;

const int MOD = 1000000007;

const int dx[4] = {1, 0, -1, 0};

const int dy[4] = {0, 1, 0, -1};



vector<int> g[100010];



int main()

{

    int n, m;

    cin >> n >> m;

    rep(i, m)

    {

        int s, t;

        cin >> s >> t;

        g[s].push_back(t);

        g[t].push_back(s);

    }

    queue<int> q;

    vector<int> dist(n + 1, -1);

    vector<int> pre(n + 1, -1);

    dist[0] = 0;

    q.push(1);



    while (!q.empty())

    {

        int v = q.front();

        q.pop();

        for (int u : g[v])

        {

            if (dist[u] != -1)

                continue;

            dist[u] = dist[v] + 1;

            pre[u] = v;

            q.push(u);

        }

    }



    cout << "Yes" << endl;

    Rep(i, 2, n + 1)

    {

        int ans = pre[i];

        cout << ans << endl;

    }

}

// Faster C++ solution for the same problem (measured speedup: 3.493481666123617x):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<int, int> P;

using Graph = vector<vector<int>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

#define Rep(i, k, n) for (int i = k; i < (int)(n); i++)

#define RRep(i, k, n) for (int i = k; i > (int)(n); i--)

#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

//#define coutyn(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

#define ALL(a)  (a).begin(),(a).end()

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const long long INF = 1LL << 60;

const int MOD = 1000000007;

const double PI = acos(-1); //3.14~

const int dx[4] = {1, 0, -1, 0};

const int dy[4] = {0, 1, 0, -1};



int main()

{

    int n, m; cin >> n >> m;

    Graph g(n + 1);

    rep(i, m)

    {

        int a, b;

        cin >> a >> b;

        --a;--b;

        g[a].push_back(b);

        g[b].push_back(a);

    }



    queue<int> q;

    vector<int> dist(n, -1);

    vector<int> pre(n, -1);

    dist[0] = 0;

    q.push(0);

    while(!q.empty())

    {

        int v = q.front();q.pop();

        for(auto it : g[v])

        {

            if (dist[it] != -1) continue;

            dist[it] = dist[v] + 1;

            pre[it] = v;

            q.push(it);

        }

    }



    cout << "Yes" << endl;

    Rep(i, 1, n)

    {

        int ans = pre[i];

        ans++;

        cout << ans << endl;

    }

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<int, int> P;

using Graph = vector<vector<int>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

#define Rep(i, k, n) for (int i = k; i < (int)(n); i++)

const long long INF = 1LL << 60;

const int MOD = 1000000007;

const int dx[4] = {1, 0, -1, 0};

const int dy[4] = {0, 1, 0, -1};



vector<int> g[100010];



int main()

{

    int n, m;

    cin >> n >> m;

    rep(i, m)

    {

        int s, t;

        cin >> s >> t;

        g[s].push_back(t);

        g[t].push_back(s);

    }

    queue<int> q;

    vector<int> dist(n + 1, -1);

    vector<int> pre(n + 1, -1);

    dist[0] = 0;

    q.push(1);



    while (!q.empty())

    {

        int v = q.front();

        q.pop();

        for (int u : g[v])

        {

            if (dist[u] != -1)

                continue;

            dist[u] = dist[v] + 1;

            pre[u] = v;

            q.push(u);

        }

    }



    cout << "Yes" << endl;

    Rep(i, 2, n + 1)

    {

        int ans = pre[i];

        cout << ans << endl;

    }

}

// Faster C++ solution for the same problem (measured speedup: 3.4916482589710456x):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef pair<int, int> P;

using Graph = vector<vector<int>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

#define Rep(i, k, n) for (int i = k; i < (int)(n); i++)

#define RRep(i, k, n) for (int i = k; i > (int)(n); i--)

#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

//#define coutyn(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

#define ALL(a)  (a).begin(),(a).end()

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const long long INF = 1LL << 60;

const int MOD = 1000000007;

const double PI = acos(-1); //3.14~

const int dx[4] = {1, 0, -1, 0};

const int dy[4] = {0, 1, 0, -1};



int main()

{

    int n, m; cin >> n >> m;

    Graph g(n + 1);

    rep(i, m)

    {

        int a, b;

        cin >> a >> b;

        g[a].push_back(b);

        g[b].push_back(a);

    }



    queue<int> q;

    vector<int> dist(n + 1, -1);

    vector<int> pre(n + 1, -1);

    dist[1] = 0;

    q.push(1);

    while(!q.empty())

    {

        int v = q.front();q.pop();

        for(auto it : g[v])

        {

            if (dist[it] != -1) continue;

            dist[it] = dist[v] + 1;

            pre[it] = v;

            q.push(it);

        }

    }



    cout << "Yes" << endl;

    Rep(i, 2, n + 1)

    {

        int ans = pre[i];

        cout << ans << endl;

    }

}
// Slower C++ solution:
#include<iostream>

#include<vector>

#include<queue>

using namespace std;

typedef long long ll;

typedef pair<ll, ll> P;

ll inf = 1000000007;

int dx[4] = { 1,-1,0,0 };

int dy[4] = { 0,0,1,-1 };

vector<ll>to[200005];

ll ans[200005] = {};

int main() {

	int n, m;

	cin >> n >> m;

	int a, b;

	for (int i = 0; i < m; i++) {

		cin >> a >> b;

		a--; b--;

		to[a].push_back(b);

		to[b].push_back(a);

	}



	vector<ll>dist(n, inf);

	vector<ll>pre(n, -1);

	dist[0] = 0;

	queue<ll>que;

	que.push(0);

	while (!que.empty()) {

		int v = que.front();

		que.pop();

		for (int id : to[v]) {

			if (dist[id] != inf)continue;

			dist[id] = dist[v] + 1;

			pre[id] = v;

			que.push(id);

		}

	}

	cout << "Yes" << endl;

	for (int i = 1; i < n; i++) {

		cout << ++pre[i] << endl;

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.8266284818492762x):
#include <cmath>

#include<iostream>

#include<algorithm>

#include<queue>

#include<vector>

using namespace std;

typedef long long ll;

typedef pair<ll, ll> P;

ll inf = 1000000007;

vector<ll>to[100005];

int main() {

	ll n, m;

	cin >> n >> m;

	int a, b;

	for (int i = 0; i < m; i++) {

		cin >> a >> b;

		a--; b--;

		to[a].push_back(b);

		to[b].push_back(a);

	}

	vector<ll>dist(n, inf);

	vector<ll>pre(n, -1);

	queue<ll>que;

	dist[0] = 0;

	que.push(0);

	while (!que.empty()) {

		int v = que.front();

		que.pop();

		for (int id : to[v]) {

			if (dist[id] != inf)continue;

			dist[id] = dist[v] + 1;

			pre[id] = v + 1;

			que.push(id);

		}

	}

	cout <<"Yes"<< endl;

	for (int i = 1; i < n; i++) {

		cout << pre[i] << endl;

	}

	return 0;

}
// Slower C++ solution:
#include<iostream>

#include<vector>

#include<queue>

using namespace std;

typedef long long ll;

typedef pair<ll, ll> P;

ll inf = 1000000007;

int dx[4] = { 1,-1,0,0 };

int dy[4] = { 0,0,1,-1 };

vector<ll>to[200005];

ll ans[200005] = {};

int main() {

	int n, m;

	cin >> n >> m;

	int a, b;

	for (int i = 0; i < m; i++) {

		cin >> a >> b;

		a--; b--;

		to[a].push_back(b);

		to[b].push_back(a);

	}



	vector<ll>dist(n, inf);

	vector<ll>pre(n, -1);

	dist[0] = 0;

	queue<ll>que;

	que.push(0);

	while (!que.empty()) {

		int v = que.front();

		que.pop();

		for (int id : to[v]) {

			if (dist[id] != inf)continue;

			dist[id] = dist[v] + 1;

			pre[id] = v;

			que.push(id);

		}

	}

	cout << "Yes" << endl;

	for (int i = 1; i < n; i++) {

		cout << ++pre[i] << endl;

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.8266520333839578x):
#include <cmath>

#include<iostream>

#include<vector>

#include<algorithm>

#include<queue>

using namespace std;

typedef long long ll;

typedef pair<ll, ll> P;

ll inf = 1000000007;

vector<ll>heya[100005];

int main(void) {

    ll n, m;

    cin >> n >> m;

   

    int a, b;

    for (int i = 0; i < m; i++) {

        cin >> a >> b;

        a--; b--;

        heya[a].push_back(b);

        heya[b].push_back(a);

    }

    queue<ll>que;

    vector<ll>dist(n, inf);

    vector<ll>pre(n, -1);

    dist[0] = 0;

    que.push(0);

    while (!que.empty()) {

        int x = que.front();

        que.pop();

        for (auto id : heya[x]) {

            if (dist[id] != inf) {

                continue;

            }

            dist[id] = dist[x] + 1;

            pre[id] = x + 1;

            que.push(id);

        }

    }

    cout << "Yes" << endl;

    for (int i = 1; i < n; i++) {

        cout << pre[i] << endl;

    }

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<vector>

#include<queue>

using namespace std;

typedef long long ll;

typedef pair<ll, ll> P;

ll inf = 1000000007;

int dx[4] = { 1,-1,0,0 };

int dy[4] = { 0,0,1,-1 };

vector<ll>to[200005];

ll ans[200005] = {};

int main() {

	int n, m;

	cin >> n >> m;

	int a, b;

	for (int i = 0; i < m; i++) {

		cin >> a >> b;

		a--; b--;

		to[a].push_back(b);

		to[b].push_back(a);

	}



	vector<ll>dist(n, inf);

	vector<ll>pre(n, -1);

	dist[0] = 0;

	queue<ll>que;

	que.push(0);

	while (!que.empty()) {

		int v = que.front();

		que.pop();

		for (int id : to[v]) {

			if (dist[id] != inf)continue;

			dist[id] = dist[v] + 1;

			pre[id] = v;

			que.push(id);

		}

	}

	cout << "Yes" << endl;

	for (int i = 1; i < n; i++) {

		cout << ++pre[i] << endl;

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.8286373846252946x):
#include <cmath>

#include<iostream>

#include<vector>

#include<algorithm>

#include<functional>

#include<queue>

#include<set>

#include<map>

#include<bitset>

#include<iomanip>

#include<stack>

#include<set>

using namespace std;

typedef long long ll;

typedef pair<ll, ll> P;

ll mod = 1000000007;

vector<ll>G[100005];

int main() {

	int n, m;

	cin >> n >> m;

	int a, b;

	

	for (int i = 0; i < m; i++) {

		cin >> a >> b;

		a--; b--;

		G[a].push_back(b);

		G[b].push_back(a);

	}



	vector<ll>dist(n, mod);

	vector<ll>pre(n, -1);

	dist[0] = 0;

	pre[0] = -1;

	queue<ll>que;

	que.push(0);

	while (!que.empty()) {

		int x = que.front();

		que.pop();

		for (auto id : G[x]) {

			if (dist[id] != mod) {

				continue;

			}

			dist[id] = dist[x] + 1;

			pre[id] = x;

			que.push(id);

		}

	}

	cout << "Yes" << endl;

	for (int i = 1; i < n; i++) {

		cout << pre[i] + 1 << endl;

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define rep(i,n) for(int i=0; i < (n); i++)

#define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower)

using namespace std;

using ll = long long;

int INF = 1001001001;



vector<int> to[200005];



int main() {

  int n, m;

  cin >> n >> m;

  rep(i, m) {

    int a, b;

    cin >> a >> b;

    a--;b--;

    to[a].push_back(b);

    to[b].push_back(a);

  }



  vector<int> dist(n, INF);

  vector<int> prev(n);

  queue<int> q;

  q.push(0);



  while(!q.empty()) {

    int v = q.front(); q.pop();

    for(int u : to[v]) {

      if(dist[u] != INF) {

        continue;

      }

      prev[u] = v;

      dist[u] = dist[v] + 1;

      q.push(u);

    }

  }

  cout << "Yes" << endl;

  rep(i, n) {

    if(i==0) continue;

    int ans = prev[i];

    ans++;

    cout << ans << endl;

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 6.327488230046253x):
#include <bits/stdc++.h>

#define rep(i,n) for(int i=0; i < (n); i++)

#define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower)

using namespace std;

using ll = long long;

int INF = 1001001001;



int main() {

  int n, m;

  cin >> n >> m;

  vector<vector<int>> g(n);

  rep(i, m) {

    int a, b;

    cin >> a >> b;

    a--; b--;

    g[a].push_back(b);

    g[b].push_back(a);

  }

  queue<int> q;

  q.push(0);

  vector<int> d(n, -1);

  vector<int> prev(n);

  d[0] = 0;

  while(!q.empty()) {

    int v = q.front(); q.pop();

    for(int nv : g[v]) {

      if(d[nv] != -1) continue;

      prev[nv] = v;

      d[nv] = d[v] + 1;

      q.push(nv);

    }

  }

  bool ok = true;

  rep(i, n) {

    if(d[i] == -1) ok = false;

  }

  if(ok) {

    cout << "Yes" << endl;

  } else {

    cout << "No" << endl;

  }

  rep(i, n) {

    if(i == 0) continue;

    cout << prev[i]+1 << endl;

  }

  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <cmath>

#include <iostream>

using namespace std;

typedef long long ll;

#define INF 1LL<<62

#define inf 1000000007



int main() {

	ll n,m,ch[200010];

	cin>>n>>m;

	vector<ll>a[200010];

	for(ll i=0;i<n;i++){

		ch[i]=-1;

	}

	for(ll i=0;i<m;i++){

		ll x,y;

		cin>>x>>y;

		x--;y--;

		a[x].push_back(y);

		a[y].push_back(x);

	}

	ch[0]=0;

	queue<ll>q;

	q.push(0);

	while(q.size()!=0){

		ll now=q.front();

		q.pop();

		for(ll i=0;i<a[now].size();i++){

			ll next=a[now][i];

			if(ch[next]!=-1){

				continue;

			}

			ch[next]=now+1;

			q.push(next);

		}

	}

	cout << "Yes"<<endl;

	for(ll i=1;i<n;i++){

		cout <<ch[i]<<endl;

	}

	// your code goes here

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.8459573602442112x):
#include <bits/stdc++.h>

#include <cmath>

#include <iostream>

using namespace std;

typedef long long ll;

#define INF 1LL<<62

#define inf 1000000007



int main() {

	ll n,m;

	cin>>n>>m;

	vector<ll>ch[100010];

	for(ll i=0;i<m;i++){

		ll x,y;

		cin>>x>>y;

		x--;y--;

		ch[x].push_back(y);

		ch[y].push_back(x);

	}

	ll ans[100010];

	for(ll i=0;i<n;i++){

		ans[i]=-1;

	}

	queue<ll>q;

	ans[0]=0;

	q.push(0);

	while(q.size()!=0){

		ll now=q.front();

		q.pop();

		//cout <<now<<endl;

		for(ll i=0;i<ch[now].size();i++){

			ll next=ch[now][i];

		//	cout <<next<<endl;

			if(ans[next]!=-1){

				continue;

			}

			ans[next]=now;

			q.push(next);

		}

	}

	cout <<"Yes"<<endl;

	for(ll i=1;i<n;i++){

		cout <<ans[i]+1<<endl;

	}

	// your code goes here

	return 0;

}