import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the subject 1 mark");
int sub1 = sc.nextInt();
System.out.println("Enter the subject 2 mark");
int sub2 = sc.nextInt();
System.out.println("Enter the subject 3 mark");
int sub3 = sc.nextInt();
System.out.println("Enter the subject 4 mark");
int sub4 = sc.nextInt();
System.out.println("Enter the subject 5 mark");
int sub5 = sc.nextInt();
int total = sub1 + sub2 + sub3 + sub4 + sub5;
float avg = total/5;
if (sub1>2 && sub2>2 && sub3>2 && sub4>2 && sub5>2) {
if ((sub1==5 || sub2==5 || sub3==5 || sub4==5 || sub5==5) && avg>=4) {
System.out.println("Yes");}
else{
System.out.println("No");}
} else {
System.out.println("No");
}
}
}