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