We have A balls with the string S written on each of them and B balls with the string T written on each of them.

From these balls, Takahashi chooses one with the string U written on it and throws it away.

Find the number of balls with the string S and balls with the string T that we have now.

-----Constraints-----
 - S, T, and U are strings consisting of lowercase English letters.
 - The lengths of S and T are each between 1 and 10 (inclusive).
 - S \not= T
 - S=U or T=U.
 - 1 \leq A,B \leq 10
 - A and B are integers.

-----Input-----
Input is given from Standard Input in the following format:
S T
A B
U

-----Output-----
Print the answer, with space in between.

-----Sample Input-----
red blue
3 4
red

-----Sample Output-----
2 4

Takahashi chose a ball with red written on it and threw it away.
Now we have two balls with the string S and four balls with the string T.
[{"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\n\nif u == s :\n  print(a-1,b)\nelse :\n  print(a,b-1)", "passed": true, "time": 0.15, "memory": 14228.0, "status": "done"}, {"code": "s, t = map(str, input().split())\na,b = map(int, input().split())\nu = input()\n\nif u == s:\n  print(a-1,b)\nelse:\n  print(a,b-1)", "passed": true, "time": 0.14, "memory": 14348.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n  print(a-1, b)\nelse:\n  print(a, b-1)", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "s, t = input().split()\na, b = [int(x) for x in input().split()]\nu = input()\nif u == s:\n  \ta -= 1\nelse:\n  \tb -= 1\nprint(a, b)", "passed": true, "time": 0.14, "memory": 14384.0, "status": "done"}, {"code": "s,t=input().split();a,b=map(int,input().split())\nprint(a-1,b)if s==input()else print(a,b-1)", "passed": true, "time": 0.23, "memory": 14180.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\n\nif u==s:a-=1\nif u==t:b-=1\n\nprint(a,b)", "passed": true, "time": 0.15, "memory": 14112.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n    a -= 1\nelif t == u:\n    b -= 1\n\nprint(a, b)", "passed": true, "time": 0.15, "memory": 14296.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\nif u == s :\n    a -= 1\nelse :\n    b -= 1\nprint(a,b)", "passed": true, "time": 0.2, "memory": 14228.0, "status": "done"}, {"code": "s,t=input().split();a,b=map(int,input().split())\nn=[(a,b-1),(a-1,b)][s==input()];print(*n,sep=' ')", "passed": true, "time": 0.3, "memory": 14208.0, "status": "done"}, {"code": "S,T = input().split()\nA,B = map(int, input().split())\nU = input()\n\nif S == U:\n    print(A-1, B)\nelse:\n    print(A, B-1)", "passed": true, "time": 0.14, "memory": 14332.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\nprint(a if u == t else a-1, end = \" \")\nprint(b-1 if u == t else b)", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = input()\n\nif U == S:\n    A -= 1\n    A = str(A)\n    B = str(B)\n    print(A+' '+B)\nelse :\n    B -= 1\n    A = str(A)\n    B = str(B)\n    print(A+' '+B)", "passed": true, "time": 0.3, "memory": 14256.0, "status": "done"}, {"code": "S, T = map(str,input().split())\nA, B = map(int,input().split())\nU = input()\n\nif S == U :\n    A += -1\nelif T == U:\n    B += -1\nprint(A,B)", "passed": true, "time": 0.19, "memory": 14104.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int, input().split())\nu=input()\nprint(a-1,b) if u==s else print(a,b-1)", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n    a -= 1\nelse:\n    b -= 1\n\nprint(a, b)", "passed": true, "time": 0.23, "memory": 14220.0, "status": "done"}, {"code": "S,T = input().split()\nA,B = map(int,input().split())\nU = input()\n\nif U ==S:\n  A-=1\nelif U ==T:\n  B-=1\nprint ('{} {}'.format(A,B))", "passed": true, "time": 0.23, "memory": 14116.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif u == s:\n\ta = a - 1\nelse:\n\tb = b - 1\n\nprint(a, b)", "passed": true, "time": 0.2, "memory": 14228.0, "status": "done"}, {"code": "S,T=list(map(str,input().split()))\nA,B=list(map(int,input().split()))\nU=str(input())\n\nif S==U:\n  print((str(A-1)+\" \"+str(B)))\nelse:\n  print((str(A)+\" \"+str(B-1)))\n", "passed": true, "time": 0.29, "memory": 14280.0, "status": "done"}, {"code": "S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif U == S:\n    print(A-1, B)\nelse:\n    print(A, B-1)", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\nif u == s:\n  print(a - 1, b)\nelse:\n  print(a, b - 1)", "passed": true, "time": 0.15, "memory": 14256.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u or s == t:\n    print(a - 1, b)\nelse:\n    print(a, b - 1)", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "s, t = input().split()\na, b = list(map(int, input().split()))\nu = input()\nif s == u:\n    print((str(a-1)+\" \"+str(b)))\nelse:\n    print((str(a)+\" \"+str(b-1)))\n", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "s, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\nif u == s:\n    print(a-1, b)\nelse:\n    print(a, b-1)", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int,input().split())\nu=input()\n\n\nif u==s:\n  print(a-1,b)\nelse:\n  print(a,b-1)", "passed": true, "time": 0.14, "memory": 14364.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n    print(a-1,b)\nelse:\n    print(a,b-1)", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\n\nif u == s:\n  print(a-1,b)\nelse:\n  print(a,b-1)", "passed": true, "time": 0.15, "memory": 14256.0, "status": "done"}, {"code": "D = {}\ns, t = input().split()\na, b = map(int, input().split())\nD[s] = a\nD[t] = b\nD[input()] -= 1\nprint(D[s], D[t]) ", "passed": true, "time": 0.15, "memory": 14372.0, "status": "done"}, {"code": "def resolve():\n    s,t = input().split()\n    a,b = map(int,input().split())\n    u = input()\n    print(a-(s==u),b-(t==u))\nresolve()", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int,input().split())\nif s==input():\n  print(a-1,b)\nelse:\n  print(a,b-1)", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int,input().split())\nu=input()\n\nif u==s:\n  a-=1\nelif u==t:\n  b-=1\n  \nprint(a,b)", "passed": true, "time": 0.15, "memory": 14352.0, "status": "done"}, {"code": "s, t = input().split()\na,b = map(int,input().split())\nu = input()\nif u == s:\n    a -= 1\nelif u == t:\n    b -= 1\nprint(a,b)", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "keys = list(map(str, input().split()))\nvalues = list(map(int, input().split()))\nrm_str = input()\n\ndicts = {key: value for key, value in zip(keys, values)}\ndicts[rm_str] = dicts[rm_str] - 1\n\nprint((' '.join([str(n) for n in list(dicts.values())])))\n", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif S == U:\n  A -= 1\nelif T == U:\n  B -= 1\nprint(str(A) + \" \" + str(B))", "passed": true, "time": 0.19, "memory": 14160.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n    print(a-1, b)\nelse:\n    print(a, b-1)", "passed": true, "time": 0.2, "memory": 14100.0, "status": "done"}, {"code": "S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=input()\nif U==S:print(A-1,B)\nelse:print(A,B-1)", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "S,T = input().split()\nA,B = map(int,input().split())\nU = input()\n\nif U == S:\n    A -= 1\nelse:\n    B -= 1\n\nprint(A,B)", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\nif S == U:\n    A -= 1\nif T == U:\n    B -= 1\nprint(A,B)", "passed": true, "time": 0.19, "memory": 14196.0, "status": "done"}, {"code": "import sys\ns,t =input().split()\na,b = map(int, input().split())\nu=input()\nif u==s:\n    print(a-1,b)\nif u==t:\n    print(a,b-1)", "passed": true, "time": 0.27, "memory": 14240.0, "status": "done"}, {"code": "# coding: utf-8\n# Your code here!\n\n[s,t] = input().split()\n[a,b] = list(map(int,input().split()))\nu = input()\n\nif s == u:\n    a -= 1\nelif t == u:\n    b -= 1\n    \nprint(a,b)", "passed": true, "time": 0.29, "memory": 14228.0, "status": "done"}, {"code": "\ndef main():\n    s,t = input().split(\" \")\n    a, b = map(int, input().split(\" \"))\n    u = input()\n    if u == s :\n        a-= 1\n    else:\n        b -= 1\n    print(f\"{a} {b}\")\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.2, "memory": 14304.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\nif u == s:\n  a -= 1\nelse:\n  b -= 1\nprint(a,b)  ", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "S,T=input().split()\nA,B=map(int,input().split())\nans={S:A,T:B}\nans[input()]-=1\nprint(*ans.values())", "passed": true, "time": 0.15, "memory": 14312.0, "status": "done"}, {"code": "a,b = input().split()\nn,m = map(int, input().split())\ns = input()\nif a == s:\n  print(n-1,m)\nelse:\n  print(n,m-1)", "passed": true, "time": 0.15, "memory": 14280.0, "status": "done"}, {"code": "S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n  print(A-1, B)\nelse:\n  print(A, B-1)", "passed": true, "time": 0.15, "memory": 14288.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int,input().split())\nu=input()\nif u==s:\n    print(a-1,b,sep=\" \")\nelse:\n    print(a,b-1,sep=\" \")", "passed": true, "time": 0.2, "memory": 14368.0, "status": "done"}, {"code": "s, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\nif u == s:\n    print(a-1, b)\nelse:\n    print(a, b-1)", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "s,t=map(str,input().split())\na,b=map(int,input().split())\nu=input()\nif u==t:\n    b-=1\nelse:\n    a-=1\nprint(a,b)", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "[S, T] = [str(i) for i in input().split()]\n[A, B] = [int(i) for i in input().split()]\nU = str(input())\n\nif S == U:\n    print(A-1, B)\nelse:\n    print(A, B-1)", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "s,t=map(str,input().split())\na,b=map(int,input().split())\nu=input()\n\nif u==s:\n    print(a-1,b)\nelse:\n    print(a,b-1)", "passed": true, "time": 0.15, "memory": 14044.0, "status": "done"}, {"code": "s,t = input().split()\na,b = [int(x) for x in input().split()]\nu = input()\nif s == u:\n  print(str(a-1) + \" \" + str(b))\nelse:\n  print(str(a) + \" \" + str(b-1))", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif U == S:\n    print(str(A - 1) + ' ' + str(B))\nelse:\n    print(str(A) + ' ' + str(B - 1))", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\nif S==U:\n  print(A-1,B)\nelse:\n  print(A,B-1)", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "S, T = input().split()\nA, B = [int(n) for n in input().split()]\nif input() == S:\n    A -= 1\nelse:\n    B -= 1\n\nprint(A, B)", "passed": true, "time": 0.23, "memory": 14308.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int,input().split())\nu=input()\nif(u==s):\n  print(a-1,b)\nelse:\n  print(a,b-1)", "passed": true, "time": 0.16, "memory": 14368.0, "status": "done"}, {"code": "x,y =input().split()\nz,w =map(int,input().split())\nu = input()\nif x==u:\n  print(z-1,w)\nelse:\n  print(z,w-1)", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif u == s:\n    a -= 1\nelif u == t:\n    b -= 1\n\nprint(a, b)", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "S,T = input().split()\nA,B = map(int,input().split())\nif input() == S:\n    print(A-1,B)\nelse:\n    print(A,B-1)", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif u == s:\n    print(a-1, b)\nelse:\n    print(a, b-1)", "passed": true, "time": 0.3, "memory": 14256.0, "status": "done"}, {"code": "S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\n\nif S == U :\n    A = A - 1\nelif T == U :\n    B = B - 1\n\nprint(A,B)", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "s,t = input().split()\na,b=map(int,input().split())\nu=input()\n\nprint(a-1, b) if s == u else print(a,b-1)", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n  print(a-1, b)\nelse:\n  print(a, b-1)", "passed": true, "time": 0.15, "memory": 14284.0, "status": "done"}, {"code": "a,b = input().split()\na_num,b_num = map(int, input().split())\nc=input()\nif(c==a):\n  a_num -= 1\nelse:\n  b_num -= 1\nprint(a_num,b_num)", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int, input().split())\nu = input()\nif s == u:\n  print('{} {}'.format(a-1,b))\nelse:\n  print('{} {}'.format(a,b-1))", "passed": true, "time": 0.16, "memory": 14228.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\nif u == s:\n    print(a-1,b)\nelse:\n    print(a,b-1)", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=input()\nif U==S:\n  print(A-1,B)\nelse:\n  print(A,B-1)", "passed": true, "time": 0.14, "memory": 14348.0, "status": "done"}, {"code": "s, t = input().split()\na, b = [int(i) for i in input().split()]\nu = input()\nif s == u:\n  a -= 1\nelif t == u:\n  b -= 1\nprint(a, b)", "passed": true, "time": 0.39, "memory": 14376.0, "status": "done"}, {"code": "S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\n\nif S == U:\n  print(A-1, B)\nelse:\n  print(A, B-1)", "passed": true, "time": 0.2, "memory": 14156.0, "status": "done"}, {"code": "S,T = map(str, input().split())\nA,B = map(int, input().split())\nU = input()\nif(S == U):\n    print(A-1,B)\nif(T == U):\n    print(A,B-1)", "passed": true, "time": 0.15, "memory": 14328.0, "status": "done"}, {"code": "s,t= input().split()\na,b= map(int, input().split())\nu=input()\n\nif s==u:\n  print(a-1,b)\nelif t==u:\n  print(a,b-1)\nelse:\n   print(a,b)", "passed": true, "time": 0.22, "memory": 14260.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s==u:\n    a -= 1\nelif t==u:\n    b -= 1\nprint(a, b)", "passed": true, "time": 0.15, "memory": 14092.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif u == s:\n    a -= 1\nelse:\n    b -= 1\n\nprint(a, b)", "passed": true, "time": 0.23, "memory": 14312.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int,input().split())\nu=input()\nprint(*(a-1,b) if s==u else (a,b-1))", "passed": true, "time": 0.14, "memory": 14240.0, "status": "done"}, {"code": "s, t = input().split()\na, b = list(map(int, input().split()))\nu = input()\n\nif u == s:\n    print(a-1,b)\nelse:\n    print(a,b-1)", "passed": true, "time": 0.15, "memory": 14100.0, "status": "done"}, {"code": "S,T=input().split()\nA,B=map(int,input().split())\nU=input()\nif S==U:\n    print(A-1,B)\nelse:\n    print(A,B-1)", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\nif(u == s):\n  print(a-1,b)\nelse:\n  print(a,b-1)", "passed": true, "time": 0.15, "memory": 14360.0, "status": "done"}, {"code": "S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=input()\n\nif U==S:\n  print(A-1,B)\nelif U==T:\n  print(A,B-1)", "passed": true, "time": 0.15, "memory": 14352.0, "status": "done"}, {"code": "S,T = input().split()\nA,B = map(int, input().split())\nU = input()\n\nif U == S:\n    print(A-1,B)\nelif U == T:\n    print(A,B-1)", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "S,T=input().split()\nA,B=map(int,input().split())\nU=input()\nif U==S:\n  print(A-1,B)\nelse:\n  print(A,B-1)", "passed": true, "time": 0.14, "memory": 14364.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\n\nif u == s:\n    a = a - 1\n    print(a,b)\n\nelif u == t:\n    b = b - 1\n    print(a,b)", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "s, t = input().split()\na, b = map(int, input().split())\nu = str(input())\n \nif u==s:\n  print(a-1, b)\nelse:\n  print(a, b-1)", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "s,t = input().split()\na,b = map(int,input().split())\nu = input()\nif u == s:\n    print(a-1,b)\nelse:\n    print(a,b-1)", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "s,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n    print(a-1,b)\nelse:\n    print(a,b-1)", "passed": true, "time": 0.23, "memory": 14256.0, "status": "done"}, {"code": "S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=input()\nif S == U:\n    print(A-1,B)\nelse:\n    print(A,B-1)", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}, {"code": "s,t=map(str,input().split())\na,b=map(int,input().split())\nu=input()\nif (s == u):\n    a -= 1\nelif(t == u):\n    b -= 1\n\nprint(a,b)", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "S,T=map(str, input().split())\nA,B=map(int, input().split())\nU=input()\n\nprint(str(A)+\" \"+str(B-1) if T==U else str(A-1)+\" \"+str(B))", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}]