PROGRAM ATCODER

implicit none
integer :: a(3), c5, c7,i

read(*,*) (a(i), i=1,3)   !ここが入力欄

! ここに計算式
c5 = 0 ; c7 = 0
do i = 1, 3
if (a(i) == 5)then
	c5 = c5 + 1
else if (a(i) == 7)then
	c7 = c7 + 1
end if
end do

! ここに出力結果
if (c5 == 2 .and. c7 == 1) then
	write(*,'(a)') 'YES'
else
	write(*,'(a)') 'NO'
end if

END PROGRAM ATCODER