program main
    implicit none
    integer, dimension(3) :: input
    integer :: num5 = 0, num7 = 0, i
    read *, input
    do i=1, 3
        select case (input(i))
        case (5)
            num5 = num5 + 1
        case (7)
            num7 = num7 + 1
        end select
    end do
    if ( num5 == 2 .and. num7 == 1) then
        write (*, fmt='(a)', advance='no') 'YES'
    else
        write (*, fmt='(a)', advance='no') 'NO'
    endif
end program main
