1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100
def Shawarma(School, N, Students):
    for i in range(N):
        Students[i][0], Students[i][1] = Students[i][0] - School[0], Students[i][1] - School[1]
        
    North, East, West, South = 0, 0, 0, 0
    for i in range(N):
        if Students[i][1] > 0:
            North += 1
        elif Students[i][1] < 0:
            South += 1
        if Students[i][0] > 0:
            East += 1
        elif Students[i][0] < 0:
            West += 1
    Max = max(North, East, West, South)
    if North == Max:
        print(School[0], School[1] + 1)
        print(Max)
    
    if South == Max:
        print(School[0], School[1] - 1)
        print(Max)
    if East == Max:
        print(School[0] + 1, School[1])
        print(Max)
    if West == Max:
        print(School[0] - 1, School[1])
        print(Max)
    