program prob1
    implicit none
    integer::a(10), b, c, d, e, i
    read(*,*) b, c, d, e
    a = 0
    a(b) = 1
    a(c) = 1
    a(d) = 1
    a(e) = 1
    if(a(1) == 1 .and. a(4) == 1 .and. a(7) == 1 .and. a(9) == 1) then
        write(*,'(a)') "YES"
    else
        write(*,'(a)') "NO"
    end if
    stop
end program