N = int(input()) ax, ay = map(int, input().split()) bx, by = map(int, input().split()) cx, cy = map(int, input().split()) ans = [] d = ((1, 0), (-1, 0), (0, 1), (0, -1)) for dy, dx in d: ny = cy + dy nx = cx + dx if not (1 <= ny <= N and 1 <= nx <= N): continue if (ny, nx) == (by, bx): continue if (ny, nx) == (ay, ax): continue ans.append((nx, ny)) print(len(ans)) for i, j in ans: print(i, j)