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

#include<iostream>

//#include<map>

//#include<vector>

//#include<algorithm>

#define ll long long

#define endl "\n"

using namespace std;

//map<int,int>m;

/*

bool isprime[500+5];

vector<int>pf;

vector<int>arr;



void sieve()   // O(N lg lg N)

{

    int n=500; //sqrt of 2^31

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

    {

        isprime[i] = true;

    }

    isprime[0] = isprime[1] = false;

    for(int i = 2; i * i <= n; i++)

    {

        if(isprime[i] == true)

        {

            for(int j = i * i; j <= n; j += i)

            {

                isprime[j] = false;

            }

        }

    }

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

    {

        if(isprime[i])

        {

            pf.push_back(i); //store the prime numbers upto 10^8

        }

    }

} */

bool check(int n)

{

    int r;

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            return true;

        }



        n=n/10;

    }

    return false;

}



int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.tie(0);//NULL;

    // sieve();

    int t;

    cin>>t;

    if(check(t))

 {

     cout<<"Yes"<<endl;

 }

 else

 {

     cout<<"No"<<endl;

 }







}






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



int main (){



char num [10];

scanf ("%s", &num);



if (num[0] =='7'|| num [1] == '7'|| num [2] == '7'){

	printf ("Yes");

}

	else {

		printf ("No\n");

}



	return 0;

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

#define ll long long

using namespace std;



int main()

{

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

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

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	string str;

	cin >> str;

	for (int i = 0; i < str.length(); i++)

	{

		if (str[i] == '7')

		{

			cout << "Yes" << "\n";

			return 0;

		}

	}

	cout << "No" << "\n";

	return 0;

}

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



int main (){



char num [10];

scanf ("%s", &num);



if (num[0] =='7'|| num [1] == '7'|| num [2] == '7'){

	printf ("Yes");

}

	else {

		printf ("No\n");

}



	return 0;

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

using namespace std;

int main()

{

    int n,res=0;

    scanf("%d",&n);

    while(1)

    {

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

    n=n/10;

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

    n=n/10;

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

        else{

        cout << "No" << "\n";

        return 0;

        }

    }

    return 0;

}


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



int main (){



char num [10];

scanf ("%s", &num);



if (num[0] =='7'|| num [1] == '7'|| num [2] == '7'){

	printf ("Yes");

}

	else {

		printf ("No\n");

}



	return 0;

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

using namespace std;

int main()

{

    int n;

    cin>>n;

    while(n)

    {

        if(n%10==7){cout<<"Yes"<<endl;return 0;}n/=10;

    }cout<<"No";

}


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

int main()

{

    int n,i=0,r;

    scanf("%d", &n);

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            i=1

            ;break;

        }

        n=n/10    ;

    }

    if(i==1)

        printf("Yes\n");

    else

        printf("No\n");

    return 0;

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

using namespace std;

string n;

int k;

int main(){

	cin>>n;

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

		k=n[i]-'0';

		if (k==7){

			cout<<"Yes"<<endl;

			return 0;

		}

	}

	cout<<"No"<<endl;

	return 0;

}

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

int main()

{

    int n,i=0,r;

    scanf("%d", &n);

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            i=1

            ;break;

        }

        n=n/10    ;

    }

    if(i==1)

        printf("Yes\n");

    else

        printf("No\n");

    return 0;

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

using namespace std;



int main(){

    int n;

    cin>>n;



   int cnt=0;

   while(n>0){

    int x=n%10;

    if(x ==7)cnt++;

    n/=10;

   }

   if(cnt>0)cout<<"Yes\n" ;

   else

    cout<<"No\n" ;









return 0;



}


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

int main()

{

    int n,i=0,r;

    scanf("%d", &n);

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            i=1

            ;break;

        }

        n=n/10    ;

    }

    if(i==1)

        printf("Yes\n");

    else

        printf("No\n");

    return 0;

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

using namespace std;

#define ll long long int



int main(){

    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

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

    int N;

    cin >> N;

    

    bool possible = false;

    while(N!=0){

        if(N%10==7){

            possible = true;

            break;

        }

        N/=10;

        

    }

    

    if(possible) cout << "Yes";

    else cout << "No";

}

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

int main()

{

    int n,i=0,r;

    scanf("%d", &n);

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            i=1

            ;break;

        }

        n=n/10    ;

    }

    if(i==1)

        printf("Yes\n");

    else

        printf("No\n");

    return 0;

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

#include<iostream>

//#include<map>

//#include<vector>

//#include<algorithm>

#define ll long long

#define endl "\n"

using namespace std;

//map<int,int>m;

/*

bool isprime[500+5];

vector<int>pf;

vector<int>arr;



void sieve()   // O(N lg lg N)

{

    int n=500; //sqrt of 2^31

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

    {

        isprime[i] = true;

    }

    isprime[0] = isprime[1] = false;

    for(int i = 2; i * i <= n; i++)

    {

        if(isprime[i] == true)

        {

            for(int j = i * i; j <= n; j += i)

            {

                isprime[j] = false;

            }

        }

    }

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

    {

        if(isprime[i])

        {

            pf.push_back(i); //store the prime numbers upto 10^8

        }

    }

} */

bool check(int n)

{

    int r;

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            return true;

        }



        n=n/10;

    }

    return false;

}



int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.tie(0);//NULL;

    // sieve();

    int t;

    cin>>t;

    if(check(t))

 {

     cout<<"Yes"<<endl;

 }

 else

 {

     cout<<"No"<<endl;

 }







}






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

int main()

{

    int n,i=0,r;

    scanf("%d", &n);

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            i=1

            ;break;

        }

        n=n/10    ;

    }

    if(i==1)

        printf("Yes\n");

    else

        printf("No\n");

    return 0;

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

#define ll long long

using namespace std;



int main()

{

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

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

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	string str;

	cin >> str;

	for (int i = 0; i < str.length(); i++)

	{

		if (str[i] == '7')

		{

			cout << "Yes" << "\n";

			return 0;

		}

	}

	cout << "No" << "\n";

	return 0;

}

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

int main()

{

    int n,i=0,r;

    scanf("%d", &n);

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            i=1

            ;break;

        }

        n=n/10    ;

    }

    if(i==1)

        printf("Yes\n");

    else

        printf("No\n");

    return 0;

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

using namespace std;

int main()

{

    int n,res=0;

    scanf("%d",&n);

    while(1)

    {

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

    n=n/10;

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

    n=n/10;

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

        else{

        cout << "No" << "\n";

        return 0;

        }

    }

    return 0;

}


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

int main()

{

    int n,i=0,r;

    scanf("%d", &n);

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            i=1

            ;break;

        }

        n=n/10    ;

    }

    if(i==1)

        printf("Yes\n");

    else

        printf("No\n");

    return 0;

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

using namespace std;

int main()

{

    int n;

    cin>>n;

    while(n)

    {

        if(n%10==7){cout<<"Yes"<<endl;return 0;}n/=10;

    }cout<<"No";

}


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

int main()

{

    int n,c,d,e;

    scanf("%d",&n);

    c=n%10;

    d=(n%100)/10;

    e=n/100;

    if(c==7||d==7||e==7)

    {

        printf("Yes");

    }



    else{printf("No");}

    return 0;

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

using namespace std;

string n;

int k;

int main(){

	cin>>n;

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

		k=n[i]-'0';

		if (k==7){

			cout<<"Yes"<<endl;

			return 0;

		}

	}

	cout<<"No"<<endl;

	return 0;

}

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

int main()

{

    int n,c,d,e;

    scanf("%d",&n);

    c=n%10;

    d=(n%100)/10;

    e=n/100;

    if(c==7||d==7||e==7)

    {

        printf("Yes");

    }



    else{printf("No");}

    return 0;

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

using namespace std;



int main(){

    int n;

    cin>>n;



   int cnt=0;

   while(n>0){

    int x=n%10;

    if(x ==7)cnt++;

    n/=10;

   }

   if(cnt>0)cout<<"Yes\n" ;

   else

    cout<<"No\n" ;









return 0;



}


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

int main()

{

    int n,c,d,e;

    scanf("%d",&n);

    c=n%10;

    d=(n%100)/10;

    e=n/100;

    if(c==7||d==7||e==7)

    {

        printf("Yes");

    }



    else{printf("No");}

    return 0;

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

using namespace std;

#define ll long long int



int main(){

    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

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

    int N;

    cin >> N;

    

    bool possible = false;

    while(N!=0){

        if(N%10==7){

            possible = true;

            break;

        }

        N/=10;

        

    }

    

    if(possible) cout << "Yes";

    else cout << "No";

}

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

int main()

{

    int n,c,d,e;

    scanf("%d",&n);

    c=n%10;

    d=(n%100)/10;

    e=n/100;

    if(c==7||d==7||e==7)

    {

        printf("Yes");

    }



    else{printf("No");}

    return 0;

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

#include<iostream>

//#include<map>

//#include<vector>

//#include<algorithm>

#define ll long long

#define endl "\n"

using namespace std;

//map<int,int>m;

/*

bool isprime[500+5];

vector<int>pf;

vector<int>arr;



void sieve()   // O(N lg lg N)

{

    int n=500; //sqrt of 2^31

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

    {

        isprime[i] = true;

    }

    isprime[0] = isprime[1] = false;

    for(int i = 2; i * i <= n; i++)

    {

        if(isprime[i] == true)

        {

            for(int j = i * i; j <= n; j += i)

            {

                isprime[j] = false;

            }

        }

    }

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

    {

        if(isprime[i])

        {

            pf.push_back(i); //store the prime numbers upto 10^8

        }

    }

} */

bool check(int n)

{

    int r;

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            return true;

        }



        n=n/10;

    }

    return false;

}



int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.tie(0);//NULL;

    // sieve();

    int t;

    cin>>t;

    if(check(t))

 {

     cout<<"Yes"<<endl;

 }

 else

 {

     cout<<"No"<<endl;

 }







}






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

int main()

{

    int n,c,d,e;

    scanf("%d",&n);

    c=n%10;

    d=(n%100)/10;

    e=n/100;

    if(c==7||d==7||e==7)

    {

        printf("Yes");

    }



    else{printf("No");}

    return 0;

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

#define ll long long

using namespace std;



int main()

{

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

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

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	string str;

	cin >> str;

	for (int i = 0; i < str.length(); i++)

	{

		if (str[i] == '7')

		{

			cout << "Yes" << "\n";

			return 0;

		}

	}

	cout << "No" << "\n";

	return 0;

}

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

int main()

{

    int n,c,d,e;

    scanf("%d",&n);

    c=n%10;

    d=(n%100)/10;

    e=n/100;

    if(c==7||d==7||e==7)

    {

        printf("Yes");

    }



    else{printf("No");}

    return 0;

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

using namespace std;

int main()

{

    int n,res=0;

    scanf("%d",&n);

    while(1)

    {

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

    n=n/10;

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

    n=n/10;

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

        else{

        cout << "No" << "\n";

        return 0;

        }

    }

    return 0;

}


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

int main()

{

    int n,c,d,e;

    scanf("%d",&n);

    c=n%10;

    d=(n%100)/10;

    e=n/100;

    if(c==7||d==7||e==7)

    {

        printf("Yes");

    }



    else{printf("No");}

    return 0;

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

using namespace std;

int main()

{

    int n;

    cin>>n;

    while(n)

    {

        if(n%10==7){cout<<"Yes"<<endl;return 0;}n/=10;

    }cout<<"No";

}


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

int main()

{

    

    char x,y,z;

    scanf("%c%c%c",&x,&y,&z);

    

    if(x=='7' || y=='7' || z=='7')printf("Yes");

    else printf("No");

    

    return 0;

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

using namespace std;

string n;

int k;

int main(){

	cin>>n;

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

		k=n[i]-'0';

		if (k==7){

			cout<<"Yes"<<endl;

			return 0;

		}

	}

	cout<<"No"<<endl;

	return 0;

}

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

int main()

{

    

    char x,y,z;

    scanf("%c%c%c",&x,&y,&z);

    

    if(x=='7' || y=='7' || z=='7')printf("Yes");

    else printf("No");

    

    return 0;

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

using namespace std;



int main(){

    int n;

    cin>>n;



   int cnt=0;

   while(n>0){

    int x=n%10;

    if(x ==7)cnt++;

    n/=10;

   }

   if(cnt>0)cout<<"Yes\n" ;

   else

    cout<<"No\n" ;









return 0;



}


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

int main()

{

    

    char x,y,z;

    scanf("%c%c%c",&x,&y,&z);

    

    if(x=='7' || y=='7' || z=='7')printf("Yes");

    else printf("No");

    

    return 0;

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

using namespace std;

#define ll long long int



int main(){

    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

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

    int N;

    cin >> N;

    

    bool possible = false;

    while(N!=0){

        if(N%10==7){

            possible = true;

            break;

        }

        N/=10;

        

    }

    

    if(possible) cout << "Yes";

    else cout << "No";

}

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

int main()

{

    

    char x,y,z;

    scanf("%c%c%c",&x,&y,&z);

    

    if(x=='7' || y=='7' || z=='7')printf("Yes");

    else printf("No");

    

    return 0;

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

#include<iostream>

//#include<map>

//#include<vector>

//#include<algorithm>

#define ll long long

#define endl "\n"

using namespace std;

//map<int,int>m;

/*

bool isprime[500+5];

vector<int>pf;

vector<int>arr;



void sieve()   // O(N lg lg N)

{

    int n=500; //sqrt of 2^31

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

    {

        isprime[i] = true;

    }

    isprime[0] = isprime[1] = false;

    for(int i = 2; i * i <= n; i++)

    {

        if(isprime[i] == true)

        {

            for(int j = i * i; j <= n; j += i)

            {

                isprime[j] = false;

            }

        }

    }

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

    {

        if(isprime[i])

        {

            pf.push_back(i); //store the prime numbers upto 10^8

        }

    }

} */

bool check(int n)

{

    int r;

    while(n>0)

    {

        r=n%10;

        if(r==7)

        {

            return true;

        }



        n=n/10;

    }

    return false;

}



int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.tie(0);//NULL;

    // sieve();

    int t;

    cin>>t;

    if(check(t))

 {

     cout<<"Yes"<<endl;

 }

 else

 {

     cout<<"No"<<endl;

 }







}






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

int main()

{

    

    char x,y,z;

    scanf("%c%c%c",&x,&y,&z);

    

    if(x=='7' || y=='7' || z=='7')printf("Yes");

    else printf("No");

    

    return 0;

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

#define ll long long

using namespace std;



int main()

{

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

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

	ios_base::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	string str;

	cin >> str;

	for (int i = 0; i < str.length(); i++)

	{

		if (str[i] == '7')

		{

			cout << "Yes" << "\n";

			return 0;

		}

	}

	cout << "No" << "\n";

	return 0;

}

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

int main()

{

    

    char x,y,z;

    scanf("%c%c%c",&x,&y,&z);

    

    if(x=='7' || y=='7' || z=='7')printf("Yes");

    else printf("No");

    

    return 0;

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

using namespace std;

int main()

{

    int n,res=0;

    scanf("%d",&n);

    while(1)

    {

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

    n=n/10;

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

    n=n/10;

    res=n%10;

    if(res-7==0){

        cout << "Yes" << "\n";

        break;

    }

        else{

        cout << "No" << "\n";

        return 0;

        }

    }

    return 0;

}


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

int main()

{

    

    char x,y,z;

    scanf("%c%c%c",&x,&y,&z);

    

    if(x=='7' || y=='7' || z=='7')printf("Yes");

    else printf("No");

    

    return 0;

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



using namespace std;



int main(){

  int N=0;

  cin>>N;

  string str=to_string(N);

  if(str.find("7")!=string::npos)

    cout<<"Yes"<<endl;

  else

    cout<<"No"<<endl;

}

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



int main(){

  int N=0;

  scanf("%d",&N);

  int a=static_cast<int>(N/100);

  int b=static_cast<int>(N%100/10);

  int c=N%10;



  if(a==7 or b==7 or c==7)

    printf("Yes\n");

  else

    printf("No\n");

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



using namespace std;





int main(){

  int N=0;

  ios_base::sync_with_stdio(false);

  cin.tie(NULL);

  cin>>N;

  string str=to_string(N);

  if(str.find("7")!=string::npos)

    cout<<"Yes"<<endl;

  else

    cout<<"No"<<endl;

}

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



int main(){

  int N=0;

  scanf("%d",&N);

  int a=static_cast<int>(N/100);

  int b=static_cast<int>(N%100/10);

  int c=N%10;



  if(a==7 or b==7 or c==7)

    printf("Yes\n");

  else

    printf("No\n");

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

#define INF 1000000000

#define LINF 1000000000000000000

#define MOD 1000000007

#define mod 1000007

#define INF63 1061109567

#define INF127 9187201950435737471

#define UINF 18446744073709551615

#define F first

#define S second

#define ll long long

#define N 200010

using namespace std;

int n,a[N],b[N],dxa[N],dxb[N],enr[4*N],ext[4*N];

int main(){

	int i,j,cnt=0;

	cin>>n;

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

	{

		cin>>a[i];

	}

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

	{

		cin>>b[i];

	}

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

	{

		dxa[i]=a[i]^a[(i+1)%n];

	}

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

	{

		dxb[i]=b[i]^b[(i+1)%n];

	}

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

	{

		enr[cnt++]=dxb[i];

	}

	enr[cnt++]=-INF;

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

	{

		enr[cnt++]=dxa[i];

	}

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

	{

		enr[cnt++]=dxa[i];

	}

	memset(ext,0,sizeof(ext));

	ext[0]=3*n+1;

	cnt=0;

	for(i=1;i<=3*n;)

	{

		while(i+cnt<=3*n)

		{

			if(enr[cnt]!=enr[i+cnt])

			{

				break;

			}

			cnt++;

		}

		ext[i]=cnt;

		j=1;

		if(cnt<=0)

		{

			i++;

			continue;

		}

		else

		{

			while(i+j<=3*n)

			{

				if(j+ext[j]>=cnt)

				{

					break;

				}

				ext[i+j]=ext[j];

				j++;

			}

		}

		i+=j;

		cnt-=j;

	}

	for(i=n+1;i<2*n+1;i++)

	{

		if(ext[i]==n)

		{

			cout<<i-n-1<<" "<<(a[i-n-1]^b[0])<<endl;

		}

	}

	return 0;

}

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

#define INF 1000000000

#define LINF 1000000000000000000

#define MOD 1000000007

#define mod 1000007

#define INF63 1061109567

#define INF127 9187201950435737471

#define UINF 18446744073709551615

#define F first

#define S second

#define ll long long

#define N 200010

#define HASH 813234241

using namespace std;

ll n,a[N],b[N],dxa[N],dxb[N],phs=0,ehs=0,pres;

ll ksm(ll x,ll y)

{

	if(y==0)

	{

		return 1;

	}

	if(y==1)

	{

		return x;

	}

	ll ret=ksm(x,y/2);

	if(y%2==1)

	{

		return (((ret*ret)%MOD)*x)%MOD;

	}

	return (ret*ret)%MOD;

}

int main(){

	ll i,j,cnt=0;

	cin>>n;

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

	{

		cin>>a[i];

	}

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

	{

		cin>>b[i];

	}

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

	{

		dxa[i]=a[i]^a[(i+1)%n];

		phs=(phs*HASH+dxa[i])%MOD;

	}

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

	{

		dxb[i]=b[i]^b[(i+1)%n];

		ehs=(ehs*HASH+dxb[i])%MOD;

	}

	pres=ksm(HASH,n-1);

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

	{

		if(phs==ehs)

		{

			cout<<i<<" "<<(a[0]^b[(n-i)%n])<<endl;

		}

		phs=(((phs-(pres*dxa[i])%MOD)%MOD)+MOD)%MOD;//减去多余的前缀 

		phs=(phs*HASH+dxa[i])%MOD;//加上第i个 

	}

	return 0;

}