package main.java.yukicoder; import java.util.Scanner; public class B { public static void main(String[] args) { //System.out.println(); Scanner scanner = new Scanner(System.in); int[] Val = new int[7]; for(int i=0; i<7; i++) Val[i] = Integer.parseInt(scanner.next()); boolean f = false; for(int i=0; i<=Val[0]; i++) { for(int j=0; j<=Val[1]; j++) { for(int k=0; k<=Val[2]; k++) { for(int l=0; l<=Val[3]; l++) { for(int m=0; m<=Val[4]; m++) { for(int n=0; n<=Val[5]; n++) { if(i+j+k+l+m+n == Val[6]) f = true; } } } } } } if(f) System.out.println("YES"); else System.out.println("NO"); scanner.close(); } }