/* -*- coding: utf-8 -*- * * 3125.cc: No.3125 Make It Symmetry - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 500; /* typedef */ /* global variables */ char s[MAX_N + 4]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); int cnt = 0; for (int i = 0; i < n; i++) { scanf("%s", s); for (int j = 0; j < n; j++) if (s[j] == '#') cnt++; } if (! (n & 1) && (cnt & 1)) puts("No"); else puts("Yes"); return 0; }