about summary refs log tree commit diff
path: root/others/volume1/027.pas
blob: 5f57027f1d905a7ddf6a18fdff8f04bad231e9c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
uses clib;

var
  n: int64;
  m: int32;

begin
  readln(n);
  m := trunc(sqrt(n));
  if issquare(n) then
    writeln(m, ' ', m)
  else if n > m * (m + 1) then
    writeln(m + 1, ' ', m + 1)
  else
    writeln(m, ' ', m + 1)
end.