#include <bits/stdc++.h>
using namespace std;
char board[55][55];
int n, m;
int dx[] = {0, 0, +1, -1};
int dy[] = {+1, -1, 0, 0};
void make(int i, int j) {
  int k, x, y, c = 0;
  for (k = 0; k < 4; k++) {
    x = i + dx[k];
    y = j + dy[k];
    if (x >= 0 && y >= 0 && x < n && y < m) {
      if (board[x][y] == '.') {
        c++;
      }
    }
  }
  if (c != 4) return;
  for (k = 0; k < 4; k++) {
    x = i + dx[k];
    y = j + dy[k];
    board[x][y] = '#';
  }
  board[i][j] = '#';
  return;
}
int check() {
  int i, j, k;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (board[i][j] != '#') return 0;
    }
  }
  return 1;
}
int main() {
  int i, j, k;
  cin >> n;
  m = n;
  for (i = 0; i < n; i++) {
    cin >> board[i];
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (board[i][j] == '.') make(i, j);
    }
  }
  if (check() == 1)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
