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

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.