program Project2; var f, g : text; kist, i, j , n, k : integer; function max (a, b : integer) : integer; begin if a > b then max := a; if b > a then max := b; end; procedure nsk(a, b : integer); var dil :integer; begin dil := max(a, b); while dil > 0 do begin if (a mod dil = 0) and (b mod dil = 0) then begin if dil = a then inc(kist); break; end; end; dec(dil); end; begin assign(f, 'pair.in'); reset(f); read(f, n); for i := 1 to n do begin for j := 1 to n do begin nsk(i, j); end; end; assign(g, 'pair.out'); rewrite(g); writeln(g, kist); close(g); { TODO -oUser -cConsole Main : Insert code here } end.