#![allow(non_snake_case)] #[allow(unused_imports)] use proconio::{fastout, input, marker::*}; #[fastout] fn main() { input! { N: usize, _: usize, _: usize, _: usize, _: usize, cx: Usize1, cy: Usize1, } let mut ans = vec![]; if cx > 0 { ans.push((cx - 1, cy)); } if cy > 0 { ans.push((cx, cy - 1)); } if cx + 1 < N { ans.push((cx + 1, cy)); } if cy + 1 < N { ans.push((cx, cy + 1)); } println!("{}", ans.len()); for (x, y) in ans { println!("{} {}", x + 1, y + 1); } }