import java.util.Arrays; import java.util.Scanner; public class Main{ public static void main(String[] args)throws Exception{ new Main().solve(); } void solve(){ Scanner sc=new Scanner(System.in); int[] d=new int[7]; for(int i=0;i<7;i++){ d[i]=sc.nextInt(); } Arrays.sort(d); int count=1; int countM=1; for(int i=0;i<6;i++){ if(d[i]==d[i+1]){ count++; countM=Math.max(countM, count); }else{ count=0; } } if(countM>=3){ System.out.println("NO"); }else{ System.out.println("YES"); } } }