implicit none
integer(8) :: i,j,a,b
integer :: n
read *,n

do i = 1, 3500
   do j = i, 3500
      a = n*i*j
      b = 4*i*j - n*i - n*j
      if (b <= 0) cycle
      if (mod(a,b) == 0) then
         if (a/b > 0) then
            print '(i0,1x,i0,1x,i0)',i,j,a/b
            stop
         endif
      endif
   enddo
enddo
end