import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop, core.stdc.stdio; void main() { auto N = readln.chomp.to!int; auto A = iota(N+1).array; foreach (i; 1..N+1) foreach (j; iota(i, N+1, i)) { A[j] -= 1; } int mn = iota(1, N).map!(i => abs(A[i] - A[N-i])).reduce!min; foreach (i; 1..N) if (abs(A[i] - A[N-i]) == mn) writeln(i, " ", N-i); }