#include #include using namespace std; long long int LMINF = -1e18; long long int modint = 1000000007; int main() { int n; cin >> n; vector> A(n,vector(n)); int count = 0; for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ cin >> A[i][j]; if(A[i][j] == '#'){ count++; } } } if(n%2 == 0){ if(count%2 == 0) { cout << "Yes"; } else { cout << "No"; } } else { cout << "Yes"; } }