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



using namespace std;



int main()

{



    string firstType, secondType, chosenType;

    int firstTypeNumber, secondTypeNumber;



    cin >> firstType >> secondType >> firstTypeNumber

    >> secondTypeNumber >> chosenType;



    if (chosenType == firstType){

        firstTypeNumber--;

    }



    else{

        secondTypeNumber--;

    }



    cout << firstTypeNumber << " " << secondTypeNumber;



    return 0;

}


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

#include<string.h>



int main(){

	char a[11], b[11], c[11];

	int d, e;

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

	scanf("%d %d\n", &d, &e);

	scanf("%s", &c);

	

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

		printf("%d %d", d - 1, e);

	}

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

		printf("%d %d", d, e - 1);

	}

		

	return 0;

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

using namespace std;

int main(){

    string s1 , s2 , chosen;

    int n1 , n2;

    cin >> s1 >> s2 >> n1 >> n2 >> chosen;

    if (chosen == s1) n1--;

    else if (chosen == s2) n2--;

    cout << n1 << " " << n2;

    return 0;

}

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

#include <string.h>



int main()

{

	int A, B;

	char S[11];

	char T[11];

	char U[11];

	

	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>

#include<string>



using namespace std;



int main()

{   string S ,T,U;

    int A,B;

    cin>>S>>T;

    cin>>A>>B;

    cin>>U;

    if (U==S){

        A--;

    }

    else{

        B--;

    }

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



    return 0;

}


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

#include <string.h>



int main()

{

	int A, B;

	char S[11];

	char T[11];

	char U[11];

	

	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--;

    } else B--;

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



    return 0;

}

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

#include <string.h>



int main()

{

	int A, B;

	char S[11];

	char T[11];

	char U[11];

	

	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 firstType, secondType, chosenType;

    int firstTypeNumber, secondTypeNumber;



    cin >> firstType >> secondType >> firstTypeNumber

    >> secondTypeNumber >> chosenType;



    if (chosenType == firstType){

        firstTypeNumber--;

    }



    else{

        secondTypeNumber--;

    }



    cout << firstTypeNumber << " " << secondTypeNumber;



    return 0;

}


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

#include <string.h>



int main()

{

	int A, B;

	char S[11];

	char T[11];

	char U[11];

	

	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 s1 , s2 , chosen;

    int n1 , n2;

    cin >> s1 >> s2 >> n1 >> n2 >> chosen;

    if (chosen == s1) n1--;

    else if (chosen == s2) n2--;

    cout << n1 << " " << n2;

    return 0;

}

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

#include <string.h>



int main()

{

	int A, B;

	char S[40];

	char T[40];

	char U[40];

	

	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

{

	B--;

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

}

	return 0;

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

#include<string>



using namespace std;



int main()

{   string S ,T,U;

    int A,B;

    cin>>S>>T;

    cin>>A>>B;

    cin>>U;

    if (U==S){

        A--;

    }

    else{

        B--;

    }

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



    return 0;

}


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

#include <string.h>



int main()

{

	int A, B;

	char S[40];

	char T[40];

	char U[40];

	

	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

{

	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--;

    } else B--;

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



    return 0;

}

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

#include <string.h>



int main()

{

	int A, B;

	char S[40];

	char T[40];

	char U[40];

	

	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

{

	B--;

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

}

	return 0;

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



using namespace std;



int main()

{



    string firstType, secondType, chosenType;

    int firstTypeNumber, secondTypeNumber;



    cin >> firstType >> secondType >> firstTypeNumber

    >> secondTypeNumber >> chosenType;



    if (chosenType == firstType){

        firstTypeNumber--;

    }



    else{

        secondTypeNumber--;

    }



    cout << firstTypeNumber << " " << secondTypeNumber;



    return 0;

}


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

#include <string.h>



int main()

{

	int A, B;

	char S[40];

	char T[40];

	char U[40];

	

	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

{

	B--;

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

}

	return 0;

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

using namespace std;

int main(){

    string s1 , s2 , chosen;

    int n1 , n2;

    cin >> s1 >> s2 >> n1 >> n2 >> chosen;

    if (chosen == s1) n1--;

    else if (chosen == s2) n2--;

    cout << n1 << " " << n2;

    return 0;

}

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

#include<string.h>



int main(){

	char A1[15],B1[15],C1[15];

	int bola1,bola2;

	scanf("%s %s",A1,B1);

	scanf("%d %d",&bola1,&bola2);

	scanf("%s",C1);

	

	(strcmp(C1,A1)==0) ? bola1-- : bola2--;

	printf("%d %d\n",bola1,bola2);

	

	return 0;

	

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

#include<string>



using namespace std;



int main()

{   string S ,T,U;

    int A,B;

    cin>>S>>T;

    cin>>A>>B;

    cin>>U;

    if (U==S){

        A--;

    }

    else{

        B--;

    }

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



    return 0;

}


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

#include<string.h>



int main(){

	char A1[15],B1[15],C1[15];

	int bola1,bola2;

	scanf("%s %s",A1,B1);

	scanf("%d %d",&bola1,&bola2);

	scanf("%s",C1);

	

	(strcmp(C1,A1)==0) ? bola1-- : bola2--;

	printf("%d %d\n",bola1,bola2);

	

	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--;

    } else B--;

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



    return 0;

}

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

#include<string.h>



int main(){

	char A1[15],B1[15],C1[15];

	int bola1,bola2;

	scanf("%s %s",A1,B1);

	scanf("%d %d",&bola1,&bola2);

	scanf("%s",C1);

	

	(strcmp(C1,A1)==0) ? bola1-- : bola2--;

	printf("%d %d\n",bola1,bola2);

	

	return 0;

	

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



using namespace std;



int main()

{



    string firstType, secondType, chosenType;

    int firstTypeNumber, secondTypeNumber;



    cin >> firstType >> secondType >> firstTypeNumber

    >> secondTypeNumber >> chosenType;



    if (chosenType == firstType){

        firstTypeNumber--;

    }



    else{

        secondTypeNumber--;

    }



    cout << firstTypeNumber << " " << secondTypeNumber;



    return 0;

}


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

#include<string.h>



int main(){

	char A1[15],B1[15],C1[15];

	int bola1,bola2;

	scanf("%s %s",A1,B1);

	scanf("%d %d",&bola1,&bola2);

	scanf("%s",C1);

	

	(strcmp(C1,A1)==0) ? bola1-- : bola2--;

	printf("%d %d\n",bola1,bola2);

	

	return 0;

	

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

    using namespace std;

    int main() {

      int a,b;

      string r,g,x;

      cin>>r;

      cin>>g;

      cin>>a>>b;

      cin>>x;

      if(x==r){

          a-=1;

      }

      else{

          b-=1;

      }

        cout<<a<<' '<<b;

     }

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

#include <string.h>



int main (){

	

	char s[11], t[11], u[11];

	int a,b;

	scanf ("%s %s", &s, &t);

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

	getchar ();

	scanf ("%s", &u );

	

	if (strcmp(	u , s ) == 0){

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

	}

	else if (strcmp( u , t) == 0){

		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 (U == S) {

        A-=1;

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

    }

    else if (U == T) {

        B-=1;

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

    }

    return 0;



}

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

#include <string.h>



int main (){

	

	char s[11], t[11], u[11];

	int a,b;

	scanf ("%s %s", &s, &t);

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

	getchar ();

	scanf ("%s", &u );

	

	if (strcmp(	u , s ) == 0){

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

	}

	else if (strcmp( u , t) == 0){

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

	}

	

	return 0;

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

#include <string>

using namespace std;







int main()

{

    int A,B;

    string S,T,U;

    cin >> S >> T;

    cin >> A >> B;

    cin >> U;



    if(S==U){

            A = A-1;



    } else if(T==U){

       B = B-1;



    }

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



    return 0;

}


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

#include <string.h>



int main (){

	

	char s[11], t[11], u[11];

	int a,b;

	scanf ("%s %s", &s, &t);

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

	getchar ();

	scanf ("%s", &u );

	

	if (strcmp(	u , s ) == 0){

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

	}

	else if (strcmp( u , t) == 0){

		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(u==s)

        cout<<a-1<<" "<<b<<endl;

    else if(u==t)

        cout<<a<<" "<<b-1<<endl;



    return 0;

}


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

#include <string.h>



int main (){

	

	char s[11], t[11], u[11];

	int a,b;

	scanf ("%s %s", &s, &t);

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

	getchar ();

	scanf ("%s", &u );

	

	if (strcmp(	u , s ) == 0){

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

	}

	else if (strcmp( u , t) == 0){

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

	}

	

	return 0;

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



using namespace std;



int main() {



   string color1,color2;

   int no1,no2;

   string color;

   cin>>color1>>color2>>no1>>no2>>color;

   if(color==color1){

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

   }

   else cout<<no1<<" "<<--no2<<endl;

    return 0;

}


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

#include <string.h>



int main (){

	

	char s[11], t[11], u[11];

	int a,b;

	scanf ("%s %s", &s, &t);

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

	getchar ();

	scanf ("%s", &u );

	

	if (strcmp(	u , s ) == 0){

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

	}

	else if (strcmp( u , t) == 0){

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

	}

	

	return 0;

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

    using namespace std;

    int main() {

      int a,b;

      string r,g,x;

      cin>>r;

      cin>>g;

      cin>>a>>b;

      cin>>x;

      if(x==r){

          a-=1;

      }

      else{

          b-=1;

      }

        cout<<a<<' '<<b;

     }

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

#include<string.h>

int main(){

	int a, b;

	char s[11];

	char t[11];

	char u[11];

	

	scanf("%s %s\n", &s, &t);

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

	scanf("%s", &u);



	if(strcmp(s,u) == 0){

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

	}

	else if(strcmp(t, u) == 0){

		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 (U == S) {

        A-=1;

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

    }

    else if (U == T) {

        B-=1;

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

    }

    return 0;



}

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

#include<string.h>

int main(){

	int a, b;

	char s[11];

	char t[11];

	char u[11];

	

	scanf("%s %s\n", &s, &t);

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

	scanf("%s", &u);



	if(strcmp(s,u) == 0){

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

	}

	else if(strcmp(t, u) == 0){

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

	}

	return 0;

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

#include <string>

using namespace std;







int main()

{

    int A,B;

    string S,T,U;

    cin >> S >> T;

    cin >> A >> B;

    cin >> U;



    if(S==U){

            A = A-1;



    } else if(T==U){

       B = B-1;



    }

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



    return 0;

}


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

#include<string.h>

int main(){

	int a, b;

	char s[11];

	char t[11];

	char u[11];

	

	scanf("%s %s\n", &s, &t);

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

	scanf("%s", &u);



	if(strcmp(s,u) == 0){

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

	}

	else if(strcmp(t, u) == 0){

		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(u==s)

        cout<<a-1<<" "<<b<<endl;

    else if(u==t)

        cout<<a<<" "<<b-1<<endl;



    return 0;

}


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

#include<string.h>

int main(){

	int a, b;

	char s[11];

	char t[11];

	char u[11];

	

	scanf("%s %s\n", &s, &t);

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

	scanf("%s", &u);



	if(strcmp(s,u) == 0){

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

	}

	else if(strcmp(t, u) == 0){

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

	}

	return 0;

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



using namespace std;



int main() {



   string color1,color2;

   int no1,no2;

   string color;

   cin>>color1>>color2>>no1>>no2>>color;

   if(color==color1){

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

   }

   else cout<<no1<<" "<<--no2<<endl;

    return 0;

}


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

#include<string.h>

int main(){

	int a, b;

	char s[11];

	char t[11];

	char u[11];

	

	scanf("%s %s\n", &s, &t);

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

	scanf("%s", &u);



	if(strcmp(s,u) == 0){

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

	}

	else if(strcmp(t, u) == 0){

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

	}

	return 0;

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

    using namespace std;

    int main() {

      int a,b;

      string r,g,x;

      cin>>r;

      cin>>g;

      cin>>a>>b;

      cin>>x;

      if(x==r){

          a-=1;

      }

      else{

          b-=1;

      }

        cout<<a<<' '<<b;

     }

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

#include <string.h>

//h

int main() {

    char a[11], b[11], c[11];

    int d, e;

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

    scanf("%d %d\n", &d, &e);

    scanf("%s", &c);



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

        printf("%d %d\n", d - 1, e);

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

        printf("%d %d\n", d, e - 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 (U == S) {

        A-=1;

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

    }

    else if (U == T) {

        B-=1;

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

    }

    return 0;



}

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

#include <string.h>

//h

int main() {

    char a[11], b[11], c[11];

    int d, e;

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

    scanf("%d %d\n", &d, &e);

    scanf("%s", &c);



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

        printf("%d %d\n", d - 1, e);

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

        printf("%d %d\n", d, e - 1);

    }



    return 0;

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

#include <string>

using namespace std;







int main()

{

    int A,B;

    string S,T,U;

    cin >> S >> T;

    cin >> A >> B;

    cin >> U;



    if(S==U){

            A = A-1;



    } else if(T==U){

       B = B-1;



    }

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



    return 0;

}


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

#include <string.h>

//h

int main() {

    char a[11], b[11], c[11];

    int d, e;

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

    scanf("%d %d\n", &d, &e);

    scanf("%s", &c);



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

        printf("%d %d\n", d - 1, e);

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

        printf("%d %d\n", d, e - 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(u==s)

        cout<<a-1<<" "<<b<<endl;

    else if(u==t)

        cout<<a<<" "<<b-1<<endl;



    return 0;

}


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

#include <string.h>

//h

int main() {

    char a[11], b[11], c[11];

    int d, e;

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

    scanf("%d %d\n", &d, &e);

    scanf("%s", &c);



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

        printf("%d %d\n", d - 1, e);

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

        printf("%d %d\n", d, e - 1);

    }



    return 0;

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



using namespace std;



int main() {



   string color1,color2;

   int no1,no2;

   string color;

   cin>>color1>>color2>>no1>>no2>>color;

   if(color==color1){

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

   }

   else cout<<no1<<" "<<--no2<<endl;

    return 0;

}


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

#include <string.h>

//h

int main() {

    char a[11], b[11], c[11];

    int d, e;

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

    scanf("%d %d\n", &d, &e);

    scanf("%s", &c);



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

        printf("%d %d\n", d - 1, e);

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

        printf("%d %d\n", d, e - 1);

    }



    return 0;

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

    using namespace std;

    int main() {

      int a,b;

      string r,g,x;

      cin>>r;

      cin>>g;

      cin>>a>>b;

      cin>>x;

      if(x==r){

          a-=1;

      }

      else{

          b-=1;

      }

        cout<<a<<' '<<b;

     }

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

#include<string.h>



 

 int main(){

 	char S[30],T[30];

 	int A, B;

 	char U[30];

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

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

 	scanf("%s", &U);

 	int com = strcmp(U,S);

 	int com2 = strcmp(U,T);

 	if(com == 0){

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

	 }

	else if(com2 == 0){

		printf("%d %d", 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 (U == S) {

        A-=1;

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

    }

    else if (U == T) {

        B-=1;

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

    }

    return 0;



}

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

#include<string.h>



 

 int main(){

 	char S[30],T[30];

 	int A, B;

 	char U[30];

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

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

 	scanf("%s", &U);

 	int com = strcmp(U,S);

 	int com2 = strcmp(U,T);

 	if(com == 0){

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

	 }

	else if(com2 == 0){

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

	}

	return 0;

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

#include <string>

using namespace std;







int main()

{

    int A,B;

    string S,T,U;

    cin >> S >> T;

    cin >> A >> B;

    cin >> U;



    if(S==U){

            A = A-1;



    } else if(T==U){

       B = B-1;



    }

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



    return 0;

}


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

#include<string.h>



 

 int main(){

 	char S[30],T[30];

 	int A, B;

 	char U[30];

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

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

 	scanf("%s", &U);

 	int com = strcmp(U,S);

 	int com2 = strcmp(U,T);

 	if(com == 0){

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

	 }

	else if(com2 == 0){

		printf("%d %d", 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(u==s)

        cout<<a-1<<" "<<b<<endl;

    else if(u==t)

        cout<<a<<" "<<b-1<<endl;



    return 0;

}


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

#include<string.h>



 

 int main(){

 	char S[30],T[30];

 	int A, B;

 	char U[30];

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

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

 	scanf("%s", &U);

 	int com = strcmp(U,S);

 	int com2 = strcmp(U,T);

 	if(com == 0){

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

	 }

	else if(com2 == 0){

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

	}

	return 0;

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



using namespace std;



int main() {



   string color1,color2;

   int no1,no2;

   string color;

   cin>>color1>>color2>>no1>>no2>>color;

   if(color==color1){

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

   }

   else cout<<no1<<" "<<--no2<<endl;

    return 0;

}


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

#include<string.h>



 

 int main(){

 	char S[30],T[30];

 	int A, B;

 	char U[30];

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

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

 	scanf("%s", &U);

 	int com = strcmp(U,S);

 	int com2 = strcmp(U,T);

 	if(com == 0){

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

	 }

	else if(com2 == 0){

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

	}

	return 0;

 }