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 solution(test_input, sx, sy):
    directions = [[-1,0], [0,-1], [1,0], [0,1]]
    
    points = 0
    coordinate = [0,0]
    for direction in directions:
        px = sx + direction[0]
        py = sy + direction[1]
        local_points = 0
        for test in test_input:
            x = test[0]
            y = test[1]
            if (px-sx)*(px-x) <= 0 and (py-sy)*(py-y) <= 0:
                local_points += 1
        if local_points > points:
            points = local_points
            coordinate = [px, py]
    
    print(points)
    print(coordinate[0], coordinate[1])

if __name__ == "__main__":
    n, sx, sy = [int(x) for x in input().split()]
    test_input = []

    for i in range(n):
        ar = [int(x) for x in input().split()]
        test_input.append(ar)

    solution(test_input, sx, sy)