!> This file was processed by `fypp`. !> Today's fortune: "Lucky AC", really OK? !> ランダムウォーク猿「'ナップサックDP' で はっぴー.」 !> ギャンブラー猿「AC...それはハチミツの味.」 program f902910 use, intrinsic :: iso_fortran_env !> auto use module implicit none integer(int32) :: n, m logical, allocatable :: g(:, :) integer(int32) :: i read(input_unit, *) n, m allocate(g(0:n-1, 0:n-1), source = .false.) do i = 1, m block integer(int32) :: a, b read(input_unit, *) a, b g(a, b) = .true. g(b, a) = .true. end block end do block integer(int32), parameter :: nv = 3 integer(int32) :: vs(nv) integer(int32) :: j read(input_unit, *) vs(:) do i = 1, nv do j = i + 1, nv if (.not. g(vs(i), vs(j))) then write(output_unit, '(a)') "Yes" stop end if end do end do write(output_unit, '(a)') "No" end block end program f902910