Language: C++

#include<bits/stdc++.h>
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld =long double;
#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<int,pii> piii;
signed main(){
    int n;cin>>n;
    int x;cin>>x;
    if(x==1)return puts("No")*0;
    cout<<"Yes"<<endl;
    map<int,int>mp;
    if(n==2){
        cout<<"1 2 3"<<endl;
    }else if(x==2){
        mp[x+1]=mp[x]=mp[x-1]=mp[x+2]=1;
    }else{
        mp[x+1]=mp[x]=mp[x-1]=mp[x-2]=1;
    }
    vi iijissougaomoitukanai;
    rep(i,2*n-1)if(mp[i+1]!=1)iijissougaomoitukanai.push_back(i+1);
    int l=0;
    for(int i=1;i<=2*n-1;i++){
        if((2*n-1)/2==i){
            if(x==2)cout<<x+1<<'\n'<<x<<'\n'<<x-1<<'\n'<<x+2<<endl;
            else cout<<x-1<<'\n'<<x<<'\n'<<x+1<<'\n'<<x-2<<endl;
            i+=3;
        }
        else cout<<iijissougaomoitukanai[l++]<<endl;
    }
}
#include<bits/stdc++.h>
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld =long double;
#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<int,pii> piii;
signed main(){
    int n;cin>>n;
    int x;cin>>x;
    if(x==1)return puts("No")*0;
    cout<<"Yes"<<endl;
    map<int,int>mp;
    if(n==2){
        cout<<"1 2 3"<<endl;
    }else if(x==2){
        mp[x+1]=mp[x]=mp[x-1]=mp[x+2]=1;
    }else{
        mp[x+1]=mp[x]=mp[x-1]=mp[x-2]=1;
    }
    vi iijissougaomoitukanai;
    rep(i,2*n-1)if(mp[i+1]!=1)iijissougaomoitukanai.push_back(i+1);
    int l=0;
    for(int i=1;i<=2*n-1;i++){
        if((2*n-1)/2==i){
            if(x==2)cout<<x+1<<'\n'<<x<<'\n'<<x-1<<'\n'<<x+2<<endl;
            else cout<<x-1<<'\n'<<x<<'\n'<<x+1<<'\n'<<x-2<<endl;
            i+=3;
        }
        else cout<<iijissougaomoitukanai[l++]<<endl;
    }
}


Compiler output:
a.cc:64:33: error: redefinition of 'template<class T, class S> void cmin(T&, const S&)'
   64 | template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
      |                                 ^~~~
a.cc:17:33: note: 'template<class T, class S> void cmin(T&, const S&)' previously declared here
   17 | template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
      |                                 ^~~~
a.cc:65:33: error: redefinition of 'template<class T, class S> void cmax(T&, const S&)'
   65 | template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
      |                                 ^~~~
a.cc:18:33: note: 'template<class T, class S> void cmax(T&, const S&)' previously declared here
   18 | template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
      |                                 ^~~~
a.cc:70:8: error: redefinition of 'int main()'
   70 | signed main(){
      |        ^~~~
a.cc:23:8: note: 'int main()' previously defined here
   23 | signed main(){
      |        ^~~~