1 2 3 4 5 6 7 8 9
var c, i: smallint; begin readln(c); writeln(c div 4); for i := 0 to c div 4 do writeln((c - i * 4) div 2, ' ', i) end.