#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n,m; cin>>n>>m; vector s(m); rep(i,m)cin>>s[i]; vector t; rep(i,n){ string tt = ""; rep(j,m)tt += s[j][i]; t.push_back(tt); } sort(t.begin(),t.end()); t.erase(unique(t.begin(),t.end()),t.end()); if(t.size()==n)cout<<"Yes"<