import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); int m = sc.nextInt(); int[] target = new int[m]; for (int i = 0; i < m; i++) { target[i] = sc.nextInt(); } int[][] colors = new int[n][m]; int[] base = new int[n]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { colors[i][j] = sc.nextInt(); } base[i] = sc.nextInt(); } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (i == j) { continue; } boolean enable = true; for (int k = 0; k < m && enable; k++) { enable = (target[k] * 10000 == colors[i][k] * base[i] * 100 + colors[j][k] * (100 - base[i]) * base[j]); } if (enable) { System.out.println("Yes"); return; } } } System.out.println("No"); } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); StringBuilder sb = new StringBuilder(); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }