#include #include #define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) using namespace atcoder; using namespace std; typedef long long ll; int binaryToInt(string s) { int res = 0; for (int i = 0; i < s.size(); i++) { res = res * 2 + (s[i] - '0'); } return res; } int main() { int m, n; cin >> m >> n; vector s(n); vector a(n); set st; rep(i, 0, n) { cin >> s[i]; a[i] = binaryToInt(s[i]); st.insert(a[i]); } if (st.size() == (1 << m)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }