#include <bits/stdc++.h>
using namespace std;
char B[500][500];
int di[5] = {-1, 1, 0, 0, 0};
int dj[5] = {0, 0, -1, 1, 0};
int n;
bool ini(int r, int c) {
  if (r < 0 || c < 0 || r >= n || c >= n) return false;
  return true;
}
int main(void) {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%s", B[i]);
  if (B[0][0] == '.' || B[n - 1][n - 1] == '.' || B[0][n - 1] == '.' ||
      B[n - 1][0] == '.') {
    puts("NO");
    return 0;
  }
  bool fl = false;
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (B[i - 1][j] == '.') {
        for (int d = 0; d < 5; d++) {
          int nr = i + di[d];
          int nc = j + dj[d];
          if (!ini(nr, nc) || B[nr][nc] == '#') {
            fl = true;
            break;
          }
          B[nr][nc] = '#';
        }
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (B[i][j] == '.') fl = true;
  if (fl)
    printf("NO");
  else
    printf("YES");
  return 0;
}
