#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  char match[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> match[i][j];
    }
  }
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if (match[i][j] == '.' && match[i - 1][j] == '.' &&
          match[i + 1][j] == '.' && match[i][j + 1] == '.' &&
          match[i][j - 1] == '.') {
        match[i][j] = '#';
        match[i - 1][j] = '#';
        match[i + 1][j] = '#';
        match[i][j + 1] = '#';
        match[i][j - 1] = '#';
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (match[i][j] == '.') {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
