namespace AtCoder; #nullable enable using System.Numerics; static class Extensions { public static T[] Repeat(this int time, Func F) => Enumerable.Range(0, time).Select(_ => F()).ToArray(); } readonly record struct Rational : IAdditiveIdentity, Rational>, IAdditionOperators, Rational, Rational>, ISubtractionOperators, Rational, Rational>, IUnaryNegationOperators, Rational>, IMultiplicativeIdentity, Rational>, IMultiplyOperators, Rational, Rational>, IDivisionOperators, Rational, Rational>, IComparable>, IEqualityOperators, Rational, bool>, IComparisonOperators, Rational, bool> where T : IBinaryInteger, IConvertible { public T P { get; private init; } public T Q { get; private init; } public Rational(T p, T q) { if (q == T.Zero) throw new DivideByZeroException(); if (q < T.Zero) (p, q) = (-p, -q); var (x, y) = (T.Abs(p), q); while (y > T.Zero) (x, y) = (y, x % y); (P, Q) = (p / x, q / x); } public Rational(T p) { (P, Q) = (p, T.One); } public static Rational AdditiveIdentity => new(T.Zero); public static Rational MultiplicativeIdentity => new(T.One); public static implicit operator Rational(T i) => new(i); public static Rational operator -(Rational r) => new(-r.P, r.Q); public static Rational operator +(Rational r1, Rational r2) => new(r1.P * r2.Q + r1.Q * r2.P, r1.Q * r2.Q); public static Rational operator -(Rational r1, Rational r2) => new(r1.P * r2.Q - r1.Q * r2.P, r1.Q * r2.Q); public static Rational operator *(Rational r1, Rational r2) => new(r1.P * r2.P, r1.Q * r2.Q); public static Rational operator /(Rational r1, Rational r2) => new(r1.P * r2.Q, r1.Q * r2.P); public static bool operator <(Rational r1, Rational r2) => r1.CompareTo(r2) < 0; public static bool operator <=(Rational r1, Rational r2) => r1.CompareTo(r2) <= 0; public static bool operator >(Rational r1, Rational r2) => r1.CompareTo(r2) > 0; public static bool operator >=(Rational r1, Rational r2) => r1.CompareTo(r2) >= 0; public int CompareTo(Rational r) => (P * r.Q).CompareTo(Q * r.P); public override string ToString() => Q == T.One ? P.ToString()! : (P.ToDouble(null) / Q.ToDouble(null)).ToString(); } class HashMap : Dictionary where K : notnull where V : struct { public new V this[K k] { get => TryGetValue(k, out var value) ? value : base[k] = default; set { base[k] = value; } } } class AtCoder { object? Solve() { var n = Int(); var m = Int(); var xz = m.Repeat(() => Int() * 100); var cz = new Rational[n][]; for (var i = 0; i < n; i++) cz[i] = new Rational[m]; var tz = new int[n]; for (var i = 0; i < n; i++) { for (var j = 0; j < m; j++) cz[i][j] = Int(); var t = tz[i] = Int(); for (var j = 0; j < m; j++) cz[i][j] *= t; } static long H(Rational[] color) { var p = 998247893; var res = 0L; foreach (var x in color) { res *= 1 << 30; res += x.P; res %= p; res *= 1 << 30; res += x.Q; res %= p; } return res; } var hcz = new long[n]; for (var i = 0; i < n; i++) hcz[i] = H(cz[i]); var hcd = new HashMap(); foreach (var h in hcz) hcd[h]++; for (var i = 0; i < n; i++) { var hi = hcz[i]; hcd[hi]--; var hz = new Rational[m]; for (var j = 0; j < m; j++) hz[j] = (xz[j] - cz[i][j]) * 100 / (100 - tz[i]); var h = H(hz); if (hcd[h] > 0) return true; hcd[hi]++; } return false; } public static void Main() => new AtCoder().Run(); public void Run() { var res = Solve(); if (res != null) { if (res is bool yes) res = yes ? "Yes" : "No"; sw.WriteLine(res); } sw.Flush(); } string[] input = Array.Empty(); int iter = 0; readonly StreamWriter sw = new(Console.OpenStandardOutput()) { AutoFlush = false }; #pragma warning disable IDE0051 string String() { while (iter >= input.Length) (input, iter) = (Console.ReadLine()!.Split(' '), 0); return input[iter++]; } T Input() where T : IParsable => T.Parse(String(), null); int Int() => Input(); void Out(object? x, string? separator = null) { separator ??= Environment.NewLine; if (x is System.Collections.IEnumerable obj and not string) { var firstLine = true; foreach (var item in obj) { if (!firstLine) sw.Write(separator); firstLine = false; sw.Write(item); } } else sw.Write(x); sw.WriteLine(); } #pragma warning restore IDE0051 }