stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#pragma GCC optimize ("O3")

///#include<bits/stdc++.h>

#include<iostream>

#include<string>

using namespace std;







/// Info.

///****************************************************************************************************************************************///

/// Coder               : BAHAA El_DEEN OSAMA SAYED.

/// Problem name        : F - Remaining Balls

/// Method              : IM-string

/// Date                : 23/2/2020

///****************************************************************************************************************************************///





#define rep0(i,x)         for(int i=0; i<=x ;++i)

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

#define mm(v,d)          memset(v,d,sizeof(v))

#define lp(i,v)          for(int i=0;i<sizeof(v);++i)

#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)

#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)

#define MP               make_pair

#define SZ(v)            ((int) ( (v).size() ) )

#define ull              unsigned long long

#define ll               long long

#define pi               3.1415926536

#define oo               1e9

#define OO               1e18

#define Fx(n)            fixed<<setprecision(n)

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

#define RE0              return 0

#define RE1              return 1

#define mp(a,b)          make_pair(a,b)

#define X                first

#define Y                second

#define pii              pair(int a, int b)

#define rep1(i,x)        for(int i=1;i<x;++i)

#define rep2(i,x)        for(int i=2;i<x;++i)

#define RE               return

//#define LD               long double

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





const  int  N   = (int) 1e5+100;

const  int  M   = (int) 1e4+4;

const  int  INF = (int) 0x3f3f3f3f;

///const double ESP = 1e-7;

///const ll MOD=1e8+9;





string str1,str2,str3;

int a=0,b=0;



int main()

{

FasterIO;



cin>> str1 >> str2 ;

cin >> a   >> b;

cin >> str3;

(str1==str3) ? --a : --b;

cout << a << " " << b;







 RE0;}


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

#include<string.h>



int main(){

int a,b;

char aName[15], bName[15], cName[15];

scanf("%s%s", aName, bName);

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

getchar();

scanf("%s", cName);

if(strcmp(cName,aName)==0)printf("%d %d\n", a-1, b);

else printf("%d %d\n", a, b-1);

	return 0;

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

using namespace std;

int main (){

    string s,t,u;

    int a,b;

    cin>>s>>t;

    cin>>a>>b;

    cin>>u;

    if (s==u){

        a-=1;

        cout<<a<<" "<<b;

    }else{

        b-=1;

        cout<<a<<" "<<b;

    }

    return 0;

}

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

#include<string.h>



int main(){

int a,b;

char aName[15], bName[15], cName[15];

scanf("%s%s", aName, bName);

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

getchar();

scanf("%s", cName);

if(strcmp(cName,aName)==0)printf("%d %d\n", a-1, b);

else printf("%d %d\n", a, b-1);

	return 0;

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



using namespace std;



int main()

{

    string x,y,z;

    int x1,y1;

    cin>>x>>y;

    cin>>x1>>y1;

    cin>>z;

    if(z==x){x1--;}

    else if(z==y){y1--;}

    cout<<x1<<" "<<y1<<endl;

    return 0;

}

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

#include<string.h>



int main(){

	

	char a[15];

	char b[15];

	char c[15];

	

	int x, y;

	

	scanf ("%s %s", &a, &b);

	getchar ();

	scanf ("%d %d", &x, &y);

	getchar();

	scanf("%s", &c);

	

	if (strcmp(a,c)==0){

		printf("%d %d", x-1, y);

	}else if (strcmp(b,c)==0){

		printf("%d %d",x,y-1);

	}

	

	return 0;

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

using namespace std;

int main() {

string S,T,U;

int A,B;

cin >> S >> T >> A >> B >> U;

if(U==S){

  A-=1;

}else if (U==T){

  B-=1;

}

cout <<A<<" " <<B;

    return 0;}

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

#include<string.h>



int main(){

	

	char a[15];

	char b[15];

	char c[15];

	

	int x, y;

	

	scanf ("%s %s", &a, &b);

	getchar ();

	scanf ("%d %d", &x, &y);

	getchar();

	scanf("%s", &c);

	

	if (strcmp(a,c)==0){

		printf("%d %d", x-1, y);

	}else if (strcmp(b,c)==0){

		printf("%d %d",x,y-1);

	}

	

	return 0;

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



using namespace std;



int main()



{

string c1 , c2 ,c3;

    cin>>c1>>c2;



    int no1,no2;

    cin>>no1>>no2;



    cin>>c3;



if (c1==c3){

    no1--;

}

else{

    no2--;

}

cout<<no1<<" "<<no2<<endl;





 return 0;

}

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

#include<string.h>



int main(){

	

	char a[15];

	char b[15];

	char c[15];

	

	int x, y;

	

	scanf ("%s %s", &a, &b);

	getchar ();

	scanf ("%d %d", &x, &y);

	getchar();

	scanf("%s", &c);

	

	if (strcmp(a,c)==0){

		printf("%d %d", x-1, y);

	}else if (strcmp(b,c)==0){

		printf("%d %d",x,y-1);

	}

	

	return 0;

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



using namespace std;



int main()

{

    string s,a,u;

    int t,b;

    cin >>s>>a;

    cin>>t>>b;

    cin>>u;

    if (u==s){

        cout<<t-1<<' '<<b<<endl;

    }

    else{

        cout<<t<<' '<<b-1<<endl;

    }

    return 0;

}


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

#include<string.h>



int main(){

	

	char a[15];

	char b[15];

	char c[15];

	

	int x, y;

	

	scanf ("%s %s", &a, &b);

	getchar ();

	scanf ("%d %d", &x, &y);

	getchar();

	scanf("%s", &c);

	

	if (strcmp(a,c)==0){

		printf("%d %d", x-1, y);

	}else if (strcmp(b,c)==0){

		printf("%d %d",x,y-1);

	}

	

	return 0;

}
// Slower C++ solution:
#pragma GCC optimize ("O3")

///#include<bits/stdc++.h>

#include<iostream>

#include<string>

using namespace std;







/// Info.

///****************************************************************************************************************************************///

/// Coder               : BAHAA El_DEEN OSAMA SAYED.

/// Problem name        : F - Remaining Balls

/// Method              : IM-string

/// Date                : 23/2/2020

///****************************************************************************************************************************************///





#define rep0(i,x)         for(int i=0; i<=x ;++i)

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

#define mm(v,d)          memset(v,d,sizeof(v))

#define lp(i,v)          for(int i=0;i<sizeof(v);++i)

#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)

#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)

#define MP               make_pair

#define SZ(v)            ((int) ( (v).size() ) )

#define ull              unsigned long long

#define ll               long long

#define pi               3.1415926536

#define oo               1e9

#define OO               1e18

#define Fx(n)            fixed<<setprecision(n)

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

#define RE0              return 0

#define RE1              return 1

#define mp(a,b)          make_pair(a,b)

#define X                first

#define Y                second

#define pii              pair(int a, int b)

#define rep1(i,x)        for(int i=1;i<x;++i)

#define rep2(i,x)        for(int i=2;i<x;++i)

#define RE               return

//#define LD               long double

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





const  int  N   = (int) 1e5+100;

const  int  M   = (int) 1e4+4;

const  int  INF = (int) 0x3f3f3f3f;

///const double ESP = 1e-7;

///const ll MOD=1e8+9;





string str1,str2,str3;

int a=0,b=0;



int main()

{

FasterIO;



cin>> str1 >> str2 ;

cin >> a   >> b;

cin >> str3;

(str1==str3) ? --a : --b;

cout << a << " " << b;







 RE0;}


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

#include<string.h>



int main(){

	

	char a[15];

	char b[15];

	char c[15];

	

	int x, y;

	

	scanf ("%s %s", &a, &b);

	getchar ();

	scanf ("%d %d", &x, &y);

	getchar();

	scanf("%s", &c);

	

	if (strcmp(a,c)==0){

		printf("%d %d", x-1, y);

	}else if (strcmp(b,c)==0){

		printf("%d %d",x,y-1);

	}

	

	return 0;

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

using namespace std;

int main (){

    string s,t,u;

    int a,b;

    cin>>s>>t;

    cin>>a>>b;

    cin>>u;

    if (s==u){

        a-=1;

        cout<<a<<" "<<b;

    }else{

        b-=1;

        cout<<a<<" "<<b;

    }

    return 0;

}

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

#include<string.h>



int main(){

	

	char a[15];

	char b[15];

	char c[15];

	

	int x, y;

	

	scanf ("%s %s", &a, &b);

	getchar ();

	scanf ("%d %d", &x, &y);

	getchar();

	scanf("%s", &c);

	

	if (strcmp(a,c)==0){

		printf("%d %d", x-1, y);

	}else if (strcmp(b,c)==0){

		printf("%d %d",x,y-1);

	}

	

	return 0;

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



using namespace std;



int main()

{

    string x,y,z;

    int x1,y1;

    cin>>x>>y;

    cin>>x1>>y1;

    cin>>z;

    if(z==x){x1--;}

    else if(z==y){y1--;}

    cout<<x1<<" "<<y1<<endl;

    return 0;

}

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

#include <string.h>



int main()

{

    char S[255], T[255];

    scanf("%s%s", S, T);

    int A,B;

    scanf("%d%d", &A, &B);

    char U[20];

    scanf("%s", U);



    int result1 = strcmp(S,U);

    int result2 = strcmp(T,U);



    if (result1 == 0)

    {

        A = A - 1;

    }

    if (result2 == 0)

    {

        B = B - 1;

    }

    printf("%d%s%d", A," ", B);

    return 0;

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

using namespace std;

int main() {

string S,T,U;

int A,B;

cin >> S >> T >> A >> B >> U;

if(U==S){

  A-=1;

}else if (U==T){

  B-=1;

}

cout <<A<<" " <<B;

    return 0;}

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

#include <string.h>



int main()

{

    char S[255], T[255];

    scanf("%s%s", S, T);

    int A,B;

    scanf("%d%d", &A, &B);

    char U[20];

    scanf("%s", U);



    int result1 = strcmp(S,U);

    int result2 = strcmp(T,U);



    if (result1 == 0)

    {

        A = A - 1;

    }

    if (result2 == 0)

    {

        B = B - 1;

    }

    printf("%d%s%d", A," ", B);

    return 0;

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



using namespace std;



int main()



{

string c1 , c2 ,c3;

    cin>>c1>>c2;



    int no1,no2;

    cin>>no1>>no2;



    cin>>c3;



if (c1==c3){

    no1--;

}

else{

    no2--;

}

cout<<no1<<" "<<no2<<endl;





 return 0;

}

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

#include <string.h>



int main()

{

    char S[255], T[255];

    scanf("%s%s", S, T);

    int A,B;

    scanf("%d%d", &A, &B);

    char U[20];

    scanf("%s", U);



    int result1 = strcmp(S,U);

    int result2 = strcmp(T,U);



    if (result1 == 0)

    {

        A = A - 1;

    }

    if (result2 == 0)

    {

        B = B - 1;

    }

    printf("%d%s%d", A," ", B);

    return 0;

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



using namespace std;



int main()

{

    string s,a,u;

    int t,b;

    cin >>s>>a;

    cin>>t>>b;

    cin>>u;

    if (u==s){

        cout<<t-1<<' '<<b<<endl;

    }

    else{

        cout<<t<<' '<<b-1<<endl;

    }

    return 0;

}


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

#include <string.h>



int main()

{

    char S[255], T[255];

    scanf("%s%s", S, T);

    int A,B;

    scanf("%d%d", &A, &B);

    char U[20];

    scanf("%s", U);



    int result1 = strcmp(S,U);

    int result2 = strcmp(T,U);



    if (result1 == 0)

    {

        A = A - 1;

    }

    if (result2 == 0)

    {

        B = B - 1;

    }

    printf("%d%s%d", A," ", B);

    return 0;

}
// Slower C++ solution:
#pragma GCC optimize ("O3")

///#include<bits/stdc++.h>

#include<iostream>

#include<string>

using namespace std;







/// Info.

///****************************************************************************************************************************************///

/// Coder               : BAHAA El_DEEN OSAMA SAYED.

/// Problem name        : F - Remaining Balls

/// Method              : IM-string

/// Date                : 23/2/2020

///****************************************************************************************************************************************///





#define rep0(i,x)         for(int i=0; i<=x ;++i)

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

#define mm(v,d)          memset(v,d,sizeof(v))

#define lp(i,v)          for(int i=0;i<sizeof(v);++i)

#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)

#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)

#define MP               make_pair

#define SZ(v)            ((int) ( (v).size() ) )

#define ull              unsigned long long

#define ll               long long

#define pi               3.1415926536

#define oo               1e9

#define OO               1e18

#define Fx(n)            fixed<<setprecision(n)

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

#define RE0              return 0

#define RE1              return 1

#define mp(a,b)          make_pair(a,b)

#define X                first

#define Y                second

#define pii              pair(int a, int b)

#define rep1(i,x)        for(int i=1;i<x;++i)

#define rep2(i,x)        for(int i=2;i<x;++i)

#define RE               return

//#define LD               long double

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





const  int  N   = (int) 1e5+100;

const  int  M   = (int) 1e4+4;

const  int  INF = (int) 0x3f3f3f3f;

///const double ESP = 1e-7;

///const ll MOD=1e8+9;





string str1,str2,str3;

int a=0,b=0;



int main()

{

FasterIO;



cin>> str1 >> str2 ;

cin >> a   >> b;

cin >> str3;

(str1==str3) ? --a : --b;

cout << a << " " << b;







 RE0;}


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

#include <string.h>



int main()

{

    char S[255], T[255];

    scanf("%s%s", S, T);

    int A,B;

    scanf("%d%d", &A, &B);

    char U[20];

    scanf("%s", U);



    int result1 = strcmp(S,U);

    int result2 = strcmp(T,U);



    if (result1 == 0)

    {

        A = A - 1;

    }

    if (result2 == 0)

    {

        B = B - 1;

    }

    printf("%d%s%d", A," ", B);

    return 0;

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

using namespace std;

int main (){

    string s,t,u;

    int a,b;

    cin>>s>>t;

    cin>>a>>b;

    cin>>u;

    if (s==u){

        a-=1;

        cout<<a<<" "<<b;

    }else{

        b-=1;

        cout<<a<<" "<<b;

    }

    return 0;

}

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

#include <string.h>



int main()

{

    char S[255], T[255];

    scanf("%s%s", S, T);

    int A,B;

    scanf("%d%d", &A, &B);

    char U[20];

    scanf("%s", U);



    int result1 = strcmp(S,U);

    int result2 = strcmp(T,U);



    if (result1 == 0)

    {

        A = A - 1;

    }

    if (result2 == 0)

    {

        B = B - 1;

    }

    printf("%d%s%d", A," ", B);

    return 0;

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



using namespace std;



int main()

{

    string x,y,z;

    int x1,y1;

    cin>>x>>y;

    cin>>x1>>y1;

    cin>>z;

    if(z==x){x1--;}

    else if(z==y){y1--;}

    cout<<x1<<" "<<y1<<endl;

    return 0;

}

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

#include<string.h>





int main(){

	char S[25];

	char T[25];

	char U[25];

	int A;

	int B;

	

	scanf ("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	scanf("%s",&U);

	

	if (strcmp(S,U) ==0){

		A--;

		printf("%d %d",A,B);

		

	}

	else if (strcmp(T,U) ==0){

		

		B--;

		printf("%d %d",A,B);

	}

	

	

	return 0;

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

using namespace std;

int main() {

string S,T,U;

int A,B;

cin >> S >> T >> A >> B >> U;

if(U==S){

  A-=1;

}else if (U==T){

  B-=1;

}

cout <<A<<" " <<B;

    return 0;}

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

#include<string.h>





int main(){

	char S[25];

	char T[25];

	char U[25];

	int A;

	int B;

	

	scanf ("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	scanf("%s",&U);

	

	if (strcmp(S,U) ==0){

		A--;

		printf("%d %d",A,B);

		

	}

	else if (strcmp(T,U) ==0){

		

		B--;

		printf("%d %d",A,B);

	}

	

	

	return 0;

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



using namespace std;



int main()



{

string c1 , c2 ,c3;

    cin>>c1>>c2;



    int no1,no2;

    cin>>no1>>no2;



    cin>>c3;



if (c1==c3){

    no1--;

}

else{

    no2--;

}

cout<<no1<<" "<<no2<<endl;





 return 0;

}

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

#include<string.h>





int main(){

	char S[25];

	char T[25];

	char U[25];

	int A;

	int B;

	

	scanf ("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	scanf("%s",&U);

	

	if (strcmp(S,U) ==0){

		A--;

		printf("%d %d",A,B);

		

	}

	else if (strcmp(T,U) ==0){

		

		B--;

		printf("%d %d",A,B);

	}

	

	

	return 0;

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



using namespace std;



int main()

{

    string s,a,u;

    int t,b;

    cin >>s>>a;

    cin>>t>>b;

    cin>>u;

    if (u==s){

        cout<<t-1<<' '<<b<<endl;

    }

    else{

        cout<<t<<' '<<b-1<<endl;

    }

    return 0;

}


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

#include<string.h>





int main(){

	char S[25];

	char T[25];

	char U[25];

	int A;

	int B;

	

	scanf ("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	scanf("%s",&U);

	

	if (strcmp(S,U) ==0){

		A--;

		printf("%d %d",A,B);

		

	}

	else if (strcmp(T,U) ==0){

		

		B--;

		printf("%d %d",A,B);

	}

	

	

	return 0;

}
// Slower C++ solution:
#pragma GCC optimize ("O3")

///#include<bits/stdc++.h>

#include<iostream>

#include<string>

using namespace std;







/// Info.

///****************************************************************************************************************************************///

/// Coder               : BAHAA El_DEEN OSAMA SAYED.

/// Problem name        : F - Remaining Balls

/// Method              : IM-string

/// Date                : 23/2/2020

///****************************************************************************************************************************************///





#define rep0(i,x)         for(int i=0; i<=x ;++i)

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

#define mm(v,d)          memset(v,d,sizeof(v))

#define lp(i,v)          for(int i=0;i<sizeof(v);++i)

#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)

#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)

#define MP               make_pair

#define SZ(v)            ((int) ( (v).size() ) )

#define ull              unsigned long long

#define ll               long long

#define pi               3.1415926536

#define oo               1e9

#define OO               1e18

#define Fx(n)            fixed<<setprecision(n)

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

#define RE0              return 0

#define RE1              return 1

#define mp(a,b)          make_pair(a,b)

#define X                first

#define Y                second

#define pii              pair(int a, int b)

#define rep1(i,x)        for(int i=1;i<x;++i)

#define rep2(i,x)        for(int i=2;i<x;++i)

#define RE               return

//#define LD               long double

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





const  int  N   = (int) 1e5+100;

const  int  M   = (int) 1e4+4;

const  int  INF = (int) 0x3f3f3f3f;

///const double ESP = 1e-7;

///const ll MOD=1e8+9;





string str1,str2,str3;

int a=0,b=0;



int main()

{

FasterIO;



cin>> str1 >> str2 ;

cin >> a   >> b;

cin >> str3;

(str1==str3) ? --a : --b;

cout << a << " " << b;







 RE0;}


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

#include<string.h>





int main(){

	char S[25];

	char T[25];

	char U[25];

	int A;

	int B;

	

	scanf ("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	scanf("%s",&U);

	

	if (strcmp(S,U) ==0){

		A--;

		printf("%d %d",A,B);

		

	}

	else if (strcmp(T,U) ==0){

		

		B--;

		printf("%d %d",A,B);

	}

	

	

	return 0;

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

using namespace std;

int main (){

    string s,t,u;

    int a,b;

    cin>>s>>t;

    cin>>a>>b;

    cin>>u;

    if (s==u){

        a-=1;

        cout<<a<<" "<<b;

    }else{

        b-=1;

        cout<<a<<" "<<b;

    }

    return 0;

}

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

#include<string.h>





int main(){

	char S[25];

	char T[25];

	char U[25];

	int A;

	int B;

	

	scanf ("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	scanf("%s",&U);

	

	if (strcmp(S,U) ==0){

		A--;

		printf("%d %d",A,B);

		

	}

	else if (strcmp(T,U) ==0){

		

		B--;

		printf("%d %d",A,B);

	}

	

	

	return 0;

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



using namespace std;



int main()

{

    string x,y,z;

    int x1,y1;

    cin>>x>>y;

    cin>>x1>>y1;

    cin>>z;

    if(z==x){x1--;}

    else if(z==y){y1--;}

    cout<<x1<<" "<<y1<<endl;

    return 0;

}

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

#include<string.h>

	int main(){

	int A,B;

	char S[15],T[15],U[15];

	

	scanf("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	getchar();

	scanf("%s",&U);

	

	if( strcmp(S,U)==0){

		A--;

		

	}

	else {

		B--;

	}		

		printf("%d %d",A,B);

		

		

		

		return 0;

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

using namespace std;

int main() {

string S,T,U;

int A,B;

cin >> S >> T >> A >> B >> U;

if(U==S){

  A-=1;

}else if (U==T){

  B-=1;

}

cout <<A<<" " <<B;

    return 0;}

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

#include<string.h>

	int main(){

	int A,B;

	char S[15],T[15],U[15];

	

	scanf("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	getchar();

	scanf("%s",&U);

	

	if( strcmp(S,U)==0){

		A--;

		

	}

	else {

		B--;

	}		

		printf("%d %d",A,B);

		

		

		

		return 0;

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



using namespace std;



int main()



{

string c1 , c2 ,c3;

    cin>>c1>>c2;



    int no1,no2;

    cin>>no1>>no2;



    cin>>c3;



if (c1==c3){

    no1--;

}

else{

    no2--;

}

cout<<no1<<" "<<no2<<endl;





 return 0;

}

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

#include<string.h>

	int main(){

	int A,B;

	char S[15],T[15],U[15];

	

	scanf("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	getchar();

	scanf("%s",&U);

	

	if( strcmp(S,U)==0){

		A--;

		

	}

	else {

		B--;

	}		

		printf("%d %d",A,B);

		

		

		

		return 0;

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



using namespace std;



int main()

{

    string s,a,u;

    int t,b;

    cin >>s>>a;

    cin>>t>>b;

    cin>>u;

    if (u==s){

        cout<<t-1<<' '<<b<<endl;

    }

    else{

        cout<<t<<' '<<b-1<<endl;

    }

    return 0;

}


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

#include<string.h>

	int main(){

	int A,B;

	char S[15],T[15],U[15];

	

	scanf("%s %s",&S,&T);

	scanf("%d %d",&A,&B);

	getchar();

	scanf("%s",&U);

	

	if( strcmp(S,U)==0){

		A--;

		

	}

	else {

		B--;

	}		

		printf("%d %d",A,B);

		

		

		

		return 0;

	}