using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static string[] SList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => ReadLine()).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = NN; var m = NN; var list = new bool[n * n]; for (var i = 0; i < n; ++i) list[n * i + i] = true; for (var i = 0; i < m; ++i) { var s = ReadLine(); for (var j = 0; j < s.Length; ++j) for (var k = j + 1; k < s.Length; ++k) { if (s[j] != s[k]) { list[j * n + k] = true; list[k * n + j] = true; } } } WriteLine(list.All(f => f) ? "Yes" : "No"); } }