#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; void solve() { int n; cin >> n; int sm = 0; rep(i, 0, n) rep(j, 0, n) { char c; cin >> c; sm += (c == '#'); } bool ok = 0; ok |= n % 2; ok |= sm % 2 == 0; cout << (ok ? "Yes" : "No") << '\n'; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t = 1; while (t--) { solve(); } }