#include <bits/stdc++.h>
using namespace std;
const int N = 55;
int n;
char s[N][N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (s[i][j] == '#') continue;
      if (i == n || i == n - 1) {
        puts("NO");
        return 0;
      }
      if (j == 1 || j == n) {
        puts("NO");
        return 0;
      }
      if (s[i + 1][j] == '#' || s[i + 1][j - 1] == '#' ||
          s[i + 1][j + 1] == '#' || s[i + 2][j] == '#') {
        puts("NO");
        return 0;
      }
      s[i][j] = s[i + 1][j] = s[i + 1][j - 1] = s[i + 1][j + 1] = s[i + 2][j] =
          '#';
    }
  puts("YES");
  return 0;
}
