program yukicoder_2392 use, intrinsic :: iso_fortran_env implicit none integer(int64) :: p integer(int64) :: i, j read(input_unit, *) p do i = 1, p if (i * i > p) exit do j = 1, p if (j * j > p) exit if (p == i * i + j * j) then write(output_unit, '(a)') "Yes" stop end if end do end do write(output_unit, '(a)') "No" end program yukicoder_2392