output_description: Print the answer, with space in between.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S T
      A B
      U
attempt: S, T = input().split()  # 文字列のの複数一行入力
  A, B = map(int, input().split())  # 数値の複数一行入力(形は覚える)
  U = input()  # 文字列の入力
  
  if U == S:  # もしUとSが同じだった場合
  
      print(A - 1, B)  # (問題文より、)Aから1引いてAとBを出力
  
  else:  # そうでなかった場合(UとTが同じだった場合)
  
      print(A, B - 1)  # Bから1引いてAとBを出力
  
  """例
  入力
  S = red , T = blue
  A = 3 , B = 4
  U = red
  
  UはSと同じだから,Sに対応するAから1引いてA(2)とB(4)を出力する
  
  出力
  2 4
  """
  
problem_description: Statement
  
  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.
samples: [{"input": "red blue\n    3 4\n    red", "output": "2 4\n    \n\nTakahashi chose a ball with `red` written on it and threw it away. Now we have\ntwo balls with the string S and four balls with the string T.\n\n* * *"}, {"input": "red blue\n    5 5\n    blue", "output": "5 4\n    \n\nTakahashi chose a ball with `blue` written on it and threw it away. Now we\nhave five balls with the string S and four balls with the string T."}]