let x = Scanf.sscanf (read_line ()) "%d" @@ fun x -> x

let pow n a = Array.fold_left ( * ) 1 @@ Array.make a n

let () =
  for a = -200 to 200 do
    for b = -200 to 200 do
      if pow a 5 - pow b 5 = x then begin
        Printf.printf "%d %d\n" a b;
        exit 0
      end
    done
  done

