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();
        Color.size = m;
        Color target = new Color();
        for (int i = 0; i < m; i++) {
            target.add(i, sc.nextInt() * 10000);
        }
        Color[] colors = new Color[n];
        for (int i = 0; i < n; i++) {
            colors[i] = new Color();
            for (int j = 0; j < m; j++) {
                colors[i].add(j, sc.nextInt());
            }
            colors[i].base = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (i == j) {
                    continue;
                }
                if (target.equals(colors[i].getColor(colors[j]))) {
                    System.out.println("Yes");
                    return;
                }
            }
        }
        System.out.println("No");
    }
    
    static class Color {
        static int size;
        int[] values = new int[size];
        int base;
        
        public void add(int idx, int v) {
            values[idx] = v;
        }
        
        public Color getColor(Color x) {
            Color ans = new Color();
            for (int i = 0; i < size; i++) {
                ans.add(i, values[i] * base * 100 + x.values[i] * (100 - base) * x.base);
            }
            return ans;
        }
        
        public boolean equals(Object o) {
            Color c = (Color)o;
            for (int i = 0; i < size; i++) {
                if (values[i] != c.values[i]) {
                    return false;
                }
            }
            return true;
        }
        
        public String toString() {
            return Arrays.toString(values);
        }
    }
}
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();
        }
    }
    
}