program main
    implicit none
    integer x1, x2, y1, y2, area

    read(*,*) area


    do y1 = 0, 1000000000
        do x1 = 0, y1
            do x2 = 0, x1
                do y2 = 0, y1
                    if(x1 /= x2 .or. y1 /= y2)then
                        if (area == abs(x1*y2-x2*y1))then
                            write(*,'(i0,a1,i0,a1,i0,a1,i0,a1,i0,a1,i0)')0,' ',0,' ', x1,' ',y1,' ', x2,' ',y2
                            stop
                        
                        endif
                    endif
                enddo
            enddo
        enddo
    enddo



end program main