program main
  
  implicit none
  integer :: a(3)  ,i
  
  read(*,*) a
  do i = 1, 3
    if ( a(i) /= 5 .and. a(i) /= 7 ) then
      print*, "NO"
      stop
    end if
  end do
  

  if( sum( a ) == 17 ) then 
    print*, "YES"
  else
    print*, "NO"
  end if
end program main
