Problem:
Score : 100 points

Problem Statement

Given is a three-digit integer N. Does N contain the digit 7?

If so, print Yes; otherwise, print No.

Constraints

100 \leq N \leq 999

Input

Input is given from Standard Input in the following format:

N

Output

If N contains the digit 7, print Yes; otherwise, print No.

Sample Input 1

117

Sample Output 1

Yes

117 contains 7 as its last digit.

Sample Input 2

123

Sample Output 2

No

123 does not contain the digit 7.

Sample Input 3

777

Sample Output 3

Yes

Solution in Fortran (GNU Fortran 9.2.1) (judge verdict: Accepted)

module degit_operation

   interface extract_degit
      module procedure extract_degit_4, extract_degit_8
   end interface

   interface num_of_degits
      module procedure num_of_degits_4, num_of_degits_8
   end interface

contains

   function extract_degit_4(num, degit)
      ! 引数numのdegit桁目の数字を取り出す関数
      implicit none
      integer, intent(in) :: num, degit
      integer :: extract_degit_4

      ! 引数numは正の整数を想定
      extract_degit_4 = mod(num,10**(degit)) / 10**(degit-1)
   end function extract_degit_4

   function extract_degit_8(num, degit)
      ! 引数numのdegit桁目の数字を取り出す関数
      implicit none
      integer(8), intent(in) :: num
      integer, intent(in) :: degit
      integer :: extract_degit_8

      ! 引数numは正の整数を想定
      extract_degit_8 = mod(num,10**(degit)) / 10**(degit-1)
   end function extract_degit_8


   function num_of_degits_4(input)
      ! 引数inputの桁数を返す関数
      implicit none
      integer, intent(in) :: input
      integer :: num_of_degits_4, degit, num

      degit = 0
      num = input
      do while (num .ne. 0)
         num = num / 10
         degit = degit + 1
      enddo

      num_of_degits_4 = degit
   end function num_of_degits_4

   function num_of_degits_8(input)
      ! 引数inputの桁数を返す関数
      implicit none
      integer(8), intent(in) :: input
      integer :: num_of_degits_8, degit, num

      degit = 0
      num = input
      do while (num .ne. 0)
         num = num / 10
         degit = degit + 1
      enddo

      num_of_degits_8 = degit
   end function num_of_degits_8

end module degit_operation

program abc162a
   use degit_operation
   implicit none
   integer :: N, i

   read(*,*) N

   do i = 1, 3
      if (extract_degit(N,i) == 7) then
         print *, 'Yes'
         stop
      end if
   end do

   print *, 'No'



end program abc162a