program main
    integer five,seven
    integer::temp(3)
    five = 0
    seven = 0
    read *,temp
    do i=1,3
        if( temp(i) == 5) then
            five = five + 1
        else if(temp(i) == 7) then
            seven = seven + 1
        end if
    end do
    if ( five == 2 .and. seven == 1) then
        print *,"YES"
    else
        print *,"NO"
    end if
end program main
