#include using namespace std; using ll = long long; const int INF = 1e9 + 10; const ll INFL = 4e18; int main() { int N; cin >> N; int ax, ay, bx, by, cx, cy; cin >> ax >> ay >> bx >> by >> cx >> cy; vector> ans; for (auto [dx, dy] : {pair{1, 0}, {0, 1}, {0, -1}, {-1, 0}}) { int x = cx + dx; int y = cy + dy; if (x > N || x < 1 || y > N || y < 1) continue; ans.push_back({x, y}); } cout << ans.size() << endl; for (auto [x, y] : ans) { cout << x << ' ' << y << endl; } }