#!/usr/bin/env python3
(s,t,),(a,b,),(u,)=[t.split() for t in open(0)]
print(int(a)-(s==u),int(b)-(t==u)) t.split() for t in open(0) for t in open(0) t open(0) open 0 for t in open(0) t.split() t.split t split (s,t,),(a,b,),(u,)=[t.split() for t in open(0)] (s,t,) s t [t.split() for t in open(0)] (a,b,) a b u print(int(a)-(s==u),int(b)-(t==u)) print int(a)-(s==u) int(a) int a s==u s u int(b)-(t==u) int(b) int b t==u t u u,)=[t.split() for t in open(0)] [t.split() for t in open(0)] u
#!/usr/bin/env python3
(s,t,),(a,b,),(u,)=[t.split() for t in open(0)]
print(int(a)-(s==u),int(b)-(t==u))
