#include <bits/stdc++.h>
using namespace std;
bool myAssert(bool b);
void testDrivenDevelopment();
int start(int argc = 0, char const *argv[] = NULL);
vector<int> *g;
bool *isvisited;
int n;
string *s;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  s = new string[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if ((s[i][j] == '.') && (s[i + 1][j] == '.') && (s[i - 1][j] == '.') &&
          (s[i][j + 1] == '.') && (s[i][j - 1] == '.')) {
        s[i][j] = '#';
        s[i + 1][j] = '#';
        s[i - 1][j] = '#';
        s[i][j + 1] = '#';
        s[i][j - 1] = '#';
      }
    }
  }
  bool b = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (s[i][j] == '.') {
        b = false;
        cout << "NO\n";
        break;
      }
    }
    if (b == false) {
      break;
    }
  }
  if (b) {
    cout << "YES\n";
  }
  if (!s) delete[] s;
  return 0;
}
