#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double num1, double bin) { return fabs(num1 - bin) < 1e-9; }
const int INF = 1 << 29;
using namespace std;
using namespace std;
using namespace std;
int jed = 0, dwa = 0;
int n;
int main() {
  int n;
  cin >> n;
  char chh[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> chh[i][j];
    }
  }
  int flg = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (chh[i][j] == '.') {
        if (i == n - 2 || i == n - 1 || j == 0 || j == n - 1) {
          flg = 1;
          break;
        }
        if (chh[i + 1][j] == '.' && chh[i + 1][j - 1] == '.' &&
            chh[i + 1][j + 1] == '.' && chh[i + 2][j] == '.') {
          chh[i + 1][j] = '#';
          chh[i][j] = '#';
          chh[i + 1][j - 1] = '#';
          chh[i + 1][j + 1] = '#';
          chh[i + 2][j] = '#';
        } else {
          flg = 1;
          break;
        }
      }
    }
    if (flg == 1) break;
  }
  if (flg == 1)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
