#include <bits/stdc++.h>
using namespace std;
const int N = 60;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, d = 0, h = 0, cnt = 0;
  cin >> n;
  char c[N][N];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      cin >> c[i][j];
      if (c[i][j] == '.')
        d++;
      else
        h++;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (c[i][j] == '.' && c[i][j - 1] == '.' && c[i][j + 1] == '.' &&
          c[i - 1][j] == '.' && c[i + 1][j] == '.') {
        c[i][j] = '#';
        c[i][j - 1] = '#';
        c[i][j + 1] = '#';
        c[i - 1][j] = '#';
        c[i + 1][j] = '#';
        cnt++;
      }
    }
  }
  if (cnt * 5 == d) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
