import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int n = Integer.parseInt(sa[0]); int m = Integer.parseInt(sa[1]); sa = br.readLine().split(" "); int[] x = new int[m]; for (int i = 0; i < m; i++) { x[i] = Integer.parseInt(sa[i]) * 10000; } int[][] c = new int[n][m]; int[] t = new int[n]; for (int i = 0; i < n; i++) { sa = br.readLine().split(" "); for (int j = 0; j < m; j++) { c[i][j] = Integer.parseInt(sa[j]); } t[i] = Integer.parseInt(sa[m]); } br.close(); String[] keys = new String[n]; Map map = new HashMap<>(); for (int i = 0; i < n; i++) { StringBuilder sb = new StringBuilder(); for (int j = 0; j < m; j++) { sb.append(t[i] * c[i][j]).append('-'); } String s = sb.toString(); keys[i] = s; map.put(s, map.getOrDefault(s, 0) + 1); } for (int i = 0; i < n; i++) { boolean flg = true; StringBuilder sb = new StringBuilder(); for (int j = 0; j < m; j++) { int v1 = x[j] - 100 * t[i] * c[i][j]; int v2 = 100 - t[i]; if (v2 == 0) { if (v1 != 0) { flg = false; break; } } if (v1 % v2 != 0) { flg = false; break; } sb.append(v1 / v2).append('-'); } if (flg) { if (t[i] == 100) { System.out.println("Yes"); return; } String s = sb.toString(); if (s.equals(keys[i])) { if (map.getOrDefault(s, 0) >= 2) { System.out.println("Yes"); return; } } else { if (map.containsKey(s)) { System.out.println("Yes"); return; } } } } System.out.println("No"); } }