stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

using namespace std;

#define PI          acos(-1)

#define INF         100000000

#define sc(n)       scanf("%d",&n);

#define ssc(n)      scanf("%s",n);

#define lsc(n)      scanf("%lld",&n);

#define dsc(n)      scanf("%lf",&n);

#define csc(n)       scanf("%c",&n);

#define LL          long long int

#define UI          unsigned int

#define ULL         unsigned long long int

#define DB          double

#define pii         pair<int,int>

#define VI          vector<int>

#define MII         map<int,int>

#define PB          push_back

#define MP          make_pair

#define M(mx,a)     mx=max(mx,a)

#define IT          ::iterator

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

#define mems(a,b)   memset(a,b,sizeof(a))

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

#define IN(n,aa)    for(i=0;i<n;i++)scanf("%d",&aa[i]);

#define PNT(n,aa)   for(i=0;i<n;i++)printf("%lld ",aa[i]);

#define mod         1000000007

#define NUM         10000009

#define NUM2        1000000000





int main()

{

    int T=1,QQ=0;

    //cin >> T ;

    while(T--)

    {

        int n,i,j,mx=0;

        cin >> n;

        string ss;

        map<string,int>mp;

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

        {

            cin >> ss;

            mp[ss]++;

        }

        map<string,int>IT it;

        for(it=mp.begin();it!=mp.end();it++)

        {

            mx=max(mx,it->second);

        }

        for(it=mp.begin();it!=mp.end();it++)

        {

            if(mx==it->second)cout << it->first << endl ;

        }

    }

}



//printf("Case %d: ",++QQ);
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

#define ll long long int

#define ff first

#define ss second

#define eps 1e-9



using namespace std;



int main()

{



    ll t,n,m,f,a,b,c,l,r,q,k,x,y,z,ans,mn,mx,sum=0;



    ios_base::sync_with_stdio(false);

    cin.tie(NULL);



    map<string,ll> mp;

    string exp;

    cin>>n;



    mx = 0;

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

    {

        cin>>exp;

        mp[exp]++;

        mx = max(mp[exp],mx);

    }



    for(auto it= mp.begin();it!=mp.end();it++)

    {

        if(it->second == mx)

        {

            cout<<it->first<<endl;

        }

    }









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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

#include<vector>

#include<algorithm>

using namespace std;

#define lli                                 long long int

#define lb                                  long double

#define pi                                  acos(-1)

#define FindDistance(ax,ay,bx,by)           sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by))

#define gcd(a,b)                            __gcd(a,b)

#define lcm(a,b)                           (a/gcd(a,b))*b

#define T                                  int t;cin>>t;for(int tt=1;tt<=t;tt++)

#define all(v)                             v.begin(),v.end()

#define pb                                 push_back

#define inf                                999999999999999

#define mod                                1000000007

#define maxn                               100003

#define FastIO                             ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

int main()

{

    lli n,i,x,j,ans;

    string s;

    map<string,lli>ma;

    cin>>n;

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

    {

        cin>>s;

        ma[s]+=1;

    }

    ans=-1;

    //map<string,lli>:: iterator itr;

    for(auto itr=ma.begin();itr!=ma.end();itr++)

    {

        x=itr->second;

        if(x>ans)

            ans=x;

    }

    //map<string,lli>:: iterator itr;

    for(auto itr=ma.begin();itr!=ma.end();itr++)

    {

        if(itr->second==ans)

            cout<<itr->first<<endl;

    }





    return 0;

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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

using namespace std;

typedef long long ll;

#define fast ios_base::sync_with_stdio(false) , cin.tie(0) ;

#define all(v) v.begin(),v.end()

#define w(x) cout << (#x) << " is " << x << "\n" ;



int main()

{

    fast ;

    int n,i,t;

    string s;

    map< string,int > m;

    vector< pair< int,string > >v;

    vector<string>x;

    cin >> t ;

    while(t--)

    {

        cin >> s ;

        m[s]++;

    }

    int mx=0;

    for(auto it =m.begin() ; it!= m.end() ; it++)

    {

        int a = it->second ;

        string y = it->first ;

        if(a>mx)mx=a;

        v.push_back(make_pair(a,y) ) ;

    }

    sort(v.rbegin(),v.rend());

    for(i = 0 ; i < v.size() ; i++)

    {

        if(v[i].first==mx)

            x.push_back(v[i].second);

    }

    sort(x.begin(),x.end());

    for(auto it :x)

        cout << it << "\n";

    cout << "\n";



    return 0;

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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

using namespace std;



const int N = 2e5 + 5;



int n, mx = 0;

map<string, int> mp;



int main() {

    cin >> n;

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

        string s;

        cin >> s;

        mx = max(mx, ++mp[s]);

    }



    for (auto it : mp) {

        if (it.second == mx) {

            cout << it.first << endl;

        }

    }

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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

using namespace std;



int main()

{

   int n;

   string s;

   set<int>s1;

   vector<string>v;

   set<int>::iterator it;

   set<string>s2;

   set<string>::iterator i1;

   map<string,int>mp;

   cin>>n;

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

   {

       cin>>s;

       v.push_back(s);

       s1.insert(mp[s]);

       mp[s]++;

   }

   mp.clear();

   it=s1.end();

   it--;

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

   {

       if(mp[v[i]]==*it)

        s2.insert(v[i]);

       mp[v[i]]++;

   }

   for(i1=s2.begin();i1!=s2.end();i1++)

    cout<<*i1<<endl;

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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

#include<algorithm>

#include <bits/stdc++.h>

#include <map>

#define endl "\n"

using namespace std;





int main()

{

    map <string,int> poll;

    int i,n,maxi=0;

    string S;

    cin >> n;

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

    {

        cin >> S;

        poll[S]++;

    }

    map <string,int>:: iterator itr;

    for (itr=poll.begin();itr != poll.end();itr++)

    {

        if (itr->second > maxi)

        {

            maxi = itr->second;

        }

    }

    for (itr=poll.begin();itr != poll.end();itr++)

    {

        if (itr->second == maxi)

        {

            cout << itr->first << endl;

        }

    }





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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

using namespace std;



int main(){

    int T,i,j,n;

    map<string,int> mp;



    cin>>n;

    string s;

    string a[n+1];

    int p=1;

    int cnt[n+1];

    memset(cnt,0,sizeof(cnt));



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

        cin>>s;

        if(mp.find(s)==mp.end()){

            mp[s]=p;

            a[p]=s;

            cnt[p]=1;

            p++;

        }

        else{

            cnt[mp[s]]++;

        }

    }



    set<string> st;

    int mx=0;

    for(i=1;i<p;i++){

        if(cnt[i]>mx) mx=cnt[i];

    }

    for(i=1;i<p;i++){

        if(cnt[i]==mx){

            st.insert(a[i]);

        }

    }

    for(set<string>:: iterator itr=st.begin();itr!=st.end();itr++){

        cout<<*itr<<endl;

    }







return 0;

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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

using namespace std;

string s;

int main()

{

    int n,i,m=0;

    map<string,int>mp;

    map<string,int>::iterator it;

    cin>>n;

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

    {

        cin>>s;

        mp[s]++;

        m=max(m,mp[s]);

    }

    for(it=mp.begin();it!= mp.end();it++)

    {

        if(m==it->second)

        {

            cout<<it->first<<endl;

        }

    }

    return 0;



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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

#define endl "\n"



typedef long long ll;

using namespace std;



//ll const N = 32000;



int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(0);cout.tie(0);



    int N, maxx = 0;

    cin >> N;



    map<string, int> mymap;



    for(int i = 0; i < N; i++)

    {

        string str;

        cin >> str;



        mymap[str]++;

        if(mymap[str] > maxx)maxx = mymap[str];

    }



    map<string, int>::iterator it;



    for(it = mymap.begin(); it != mymap.end(); it++)

    {

        if(it -> second == maxx)cout << it -> first << endl;

    }



    return 0;

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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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

using namespace std;

#define ll long long

#define all(v) v.begin(),v.end()

#define endll "\n"



#define fin             freopen("input.txt","r",stdin);

#define fout            freopen("output.txt","w",stdout);





int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    int n;

    cin >> n;

    map<string , int > mp;

    string s;

    while(n--){

        cin >> s;

        if(mp.count(s)==false){

            mp[s]=1;

        }

        else{

            mp[s]++;

        }

    }

    int mx=0;

    for(auto it:mp){

        if(it.second>mx) mx=it.second;

    }

    for(auto it:mp){

        if(it.second==mx){

            cout << it.first << endl;

        }



    }



    return 0;

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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


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



using namespace std;



#define endl '\n'

#define Opy ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)



typedef long long ll;



int main()

{

    Opy;



/*-------------------------------------------------

#ifndef ONLINE_JUDGE

    freopen("input.txt", "r", stdin);

    freopen("output.txt", "w", stdout);

#endif

-------------------------------------------------*/

    int t, cnt = 0;



    map< string, int> A;



    cin>> t;



    for(int i = 0; i< t; i++)

    {

        string tmp;



        cin>> tmp;



        A[tmp]++;



        cnt = max(cnt, A[tmp]);

    }



    auto it = A.begin();



    while( it != A.end())

    {

        if(cnt == it-> second)

        {

            cout << it->first<< endl;

        }



        it++;

    }



    return 0;

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

using namespace std;

const int N=2e5+5;

char tmp[N];

pair<int,string> A[N];

map<string , int> idx;

map<string , int>mp;

map<int,vector<string> > rmp;

int main()

{

    int n,mx=-1;

    scanf("%d",&n);

    string s;

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

        scanf("%s",tmp);

        string s(tmp);

        mx = max(mx,++mp[s]);

        rmp[mp[s]].push_back(s);

    }

    sort(rmp[mx].begin(),rmp[mx].end());

    for(auto x:rmp[mx]){

        printf("%s\n",x.c_str());

    }



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 9.883702731577314x):
// Author: Amey Bhavsar

// IDE: Geany/Ubuntu

// Platform: *



#include<bits/stdc++.h>

using namespace std;



typedef long long ll;



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

#define repD(i,a,b) for(auto i=a;i>=b;i--)

#define pb push_back

#define mp make_pair

#define ff first

#define ss second



// to be used with algorithms that processes a container Eg: find(all(c),42)

#define all(x) (x).begin(), (x).end() //Forward traversal

#define rall(x) (x).rbegin, (x).rend() //reverse traversal

// traversal function to avoid long template definition

#define tr(c,i) for(__typeof__((c)).begin() i = (c).begin(); i != (c).end(); i++)

//find version works for all containers. This is present in std namespace.

#define cpresent(c,x) (find(all(c),x) != (c).end())

// ll fe (ll x, ll y) {

	// ll ans = 1;

	// while (y>0) {

		// if (y&1) {

			// ans = (x*ans) % MOD;

		// }

		// y /= 2;

		// x = (x*x) % MOD;

	// }

	// return (ans % MOD);

// }



// ll modmul(ll a, ll b) {

    // return ((a%MOD) * (b%MOD)) % MOD;

// }



// ll modadd(ll a , ll b){

    // return((a%MOD)+(b%MOD)+MOD)%MOD;

// }



// ll modsub(ll a , ll b){

    // return((a%MOD) - (b%MOD) + MOD)%MOD;

// }

#define MOD 1000000007





int main() {

	ios_base::sync_with_stdio(false);cin.tie(NULL);

	int n;

	cin >> n;

	map<string,int> mp1;

	vector<string> ans;

	rep(i,0,n) {

		string s;

		cin >> s;

		mp1[s]++;

	}

	

	int mx = 0;

	for (auto& e:mp1) {

		mx = max(mx, e.second);

	}

	for (auto& e:mp1) {

		if (e.second == mx ) {

			ans.emplace_back(e.first);

		}

	}

	

	sort(all(ans));

	for (auto& e:ans) cout << e<< '\n';

	return 0;

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

using namespace std;

#define ll long long int

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

#define rrep(i,n) for( int i = n; i >= 0; i-- )

#define REP(i,s,t) for( int i = s; i <= t; i++ )

#define RREP(i,s,t) for( int i = s; i >= t; i-- )

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define INF 2000000000

#define mod 1000000007

#define INF2 1000000000000000000



string S[200010];

int main(void)

{

    cin.tie(0);

    ios::sync_with_stdio(false);

    int N; cin >> N;

    map<string, int> mp;

    rep(i, N) {

        cin >> S[i];

        mp[S[i]]++;

    }

    int cnt = 0;

    rep(i, N) {

        cnt = max(cnt, mp[S[i]]);

    }

    set<string> v;

    rep(i, N) if (mp[S[i]] == cnt) v.insert(S[i]);

    for(auto itr = v.begin(); itr != v.end(); itr++) {

        cout << *itr << endl;

    }



        



    return 0;

}


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

#include <fstream>

#include <set>

#include <map>

#include <string>

#include <vector>

#include <queue>

#include <deque>

#include <stack>

#include <functional>

#include <algorithm>

#include <climits>

#include <cmath>

#include <iomanip>

using namespace std;

#define ll long long int

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

#define rrep(i,n) for( int i = n; i >= 0; i-- )

#define REP(i,s,t) for( int i = s; i <= t; i++ )

#define RREP(i,s,t) for( int i = s; i >= t; i-- )

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define INF 2000000000

#define mod 1000000007

#define INF2 1000000000000000000



map<string, int> mp;

int main(void)

{

    cin.tie(0);

    ios::sync_with_stdio(false);

    int N; cin >> N;

    rep(i, N) {

        string S; cin >> S;

        mp[S]++;

    }

    int len = 0;

    for(auto itr = mp.begin(); itr != mp.end(); itr++) {

        len = max(len, itr->second);

    }

    for(auto itr = mp.begin(); itr != mp.end(); itr++) {

        if(itr->second == len)

        cout << itr->first << endl;

    }

    return 0;

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

#include<cstdio>

#include<cmath>

#include<cstdlib>

#include<cstring>

#include<algorithm>

#define ll long long

using namespace std;



int T;

bool tag;

ll a,b,c,d,now,x,y;



int main(){

//	freopen("b.in","r",stdin);

//	freopen("b.out","w",stdout);

	int i;

	scanf("%d",&T);

	while (T--){

		scanf("%lld%lld%lld%lld",&a,&b,&c,&d);

		if (a<b){

			printf("No\n");

			continue;

		}

		now=a; tag=1;

		if (b>d){

			printf("No\n");

			continue;

		}

		if (b<=c){

			printf("Yes\n");

			continue;

		}

		if (b==d){

			if (now%b>c) printf("No\n");

			else printf("Yes\n");

			continue;

		}

		now=now%b;

		x=d%b;

		if (now>c){

			printf("No\n");

			continue;

		}

		if (x==0){

			printf("Yes\n");

			continue;

		}

		if (c==b-1){

			printf("Yes\n");

			continue;

		}

		for (i=1;i<=100000;i++){

			y=(b-1-now)/x;

			now=now+x*y;

			if (now>c){

				tag=0;

				break;

			}

			now=(now+x)%b;

		}

		if (tag) printf("Yes\n");

		else printf("No\n");

	}

	return 0;

}

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

#include<cstdio>

#include<cmath>

#include<cstdlib>

#include<cstring>

#include<algorithm>

#define ll long long

using namespace std;



int T;

bool tag;

ll a,b,c,d,now,x,y,g;



ll gcd(ll a,ll b){

	if (!b) return a;

	else return gcd(b,a%b);

} 



int main(){

//	freopen("b.in","r",stdin);

//	freopen("b.out","w",stdout);

	int i;

	scanf("%d",&T);

	while (T--){

		scanf("%lld%lld%lld%lld",&a,&b,&c,&d);

		if (a<b){

			printf("No\n");

			continue;

		}

		now=a; tag=1;

		if (b>d){

			printf("No\n");

			continue;

		}

		if (b<=c){

			printf("Yes\n");

			continue;

		}

		if (b==d){

			if (now%b>c) printf("No\n");

			else printf("Yes\n");

			continue;

		}

		now=now%b;

		x=d%b;

		if (now>c){

			printf("No\n");

			continue;

		}

		if (x==0){

			printf("Yes\n");

			continue;

		}

		if (c==b-1){

			printf("Yes\n");

			continue;

		}

		g=gcd(x,b);

		if (b-g+now%g<=c) printf("Yes\n");

		else printf("No\n");

	}

	return 0;

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



using namespace std;



int main()

{

    int a,b,c,k,cont;

    cin>>a>>b>>c>>k;

    while(a>=b)

    {

        cont++;

        b=b*2;

    }

    while(b>=c)

    {

        cont++;

        c=c*2;

    }

    if(cont>k)

    {

        cout<<"No";

    }

    else

    {

        cout<<"Yes";

    }

}

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

int main(){

	int a,b,c,k,count=0;

	scanf("%d%d%d%d",&a,&b,&c,&k);

	while(a>=b){

		b=b*2;

		count++;

	}

	while(b>=c){

		c=c*2;

		count++;

	}

	if(count>k)

	printf("No");

	else

	printf("Yes");

}