#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector tb(1 << n); vector a(m); bitset<16> tmp; for(auto &&v : a){ cin >> tmp; tb[v = tmp.to_ullong()] = true; } for(int i = 0; i < n; i++){ for(int j = 0; j < i; j++){ if(!tb[a[i] & a[j]] || !tb[a[i] | a[j]]){ cout << "No\n"; exit(0); } } } cout << (tb[0] && tb.back() ? "Yes" : "No") << '\n'; }