Problem2351--You should output ARC, though this is ABC.

2351: You should output ARC, though this is ABC.

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 100100 points

Problem Statement

Given integers RRCC, and a 2 \times 22×2 matrix AA, print A_{R,C}AR,C.


(给定两个整数R和C,请输出一个2*2矩阵中的第R行第C列上的数字)

Constraints

  • All values in input are integers.
  • 1 \le R,C \le 21R,C2
  • 0 \le A_{i,j} \le 1000Ai,j100

Input

Input is given from Standard Input in the following format:
RRCCA_{1,1}A1,1A_{1,2}A1,2A_{2,1}A2,1A_{2,2}A2,2

Output

Print the answer as an integer.

Sample Input Copy

1 2
1 0
0 1

Sample Output Copy

0

HINT

We have A_{1,2}=0A1,2=0.

Source/Category