Problem F: 演唱会

Problem F: 演唱会

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

Description

Input

Output

Sample Input Copy

4 2 3 2
2 4 3 1
1 2 3 4
2 3 4 1

Sample Output Copy

3 4

HINT