#include #include #include #include using namespace std; int main() { int N, M; cin >> N >> M; vector S(N, string(M, '.')); for (int i = 0; i < M; ++i) { for (auto &s : S) cin >> s.at(i); } cout << (S.size() == set{S.begin(), S.end()}.size() ? "Yes" : "No") << '\n'; }