inf = open("division.in", "r")
ouf = open("division.out", "w")

n = int(inf.readline())
x = [tuple(map(int, inf.readline().split())) for i in range(n)]
x.sort()

ans = set()
for i, (a, b) in enumerate(x):
    if i == 0:
        ap = a
        continue
    if a != ap:
        ans.add(('x', a))
    else:
        ans.add(('y', b))
    ap = a

print(len(ans), file = ouf)
for c, p in ans:
    print(c + ' ' + str(p), file=ouf)
