#include <bits/stdc++.h>
using namespace std;
void pairsort(long long a[], long long b[], long long k) {
  pair<long long, long long> pairt[k];
  for (long long i = 0; i < k; i++) {
    pairt[i].first = a[i];
    pairt[i].second = b[i];
  }
  sort(pairt, pairt + k);
  for (long long i = 0; i < k; i++) {
    a[i] = pairt[i].first;
    b[i] = pairt[i].second;
  }
}
long long CheckPrime(long long k) {
  for (long long i = 2; i < k; i++)
    if (k % i == 0) return 0;
  return 1;
}
long long countdigit(long long n) { return floor(log10(n) + 1); }
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  char a[n][n];
  long long k = 0, l = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      cin >> a[i][j];
      if (a[i][j] == '.')
        k++;
      else
        l++;
    }
  }
  for (long long i = 1; i <= n - 2; i++) {
    for (long long j = 1; j <= n - 2; j++) {
      if (a[i][j] == '.' && a[i + 1][j] == '.' && a[i - 1][j] == '.' &&
          a[i][j - 1] == '.' && a[i][j + 1] == '.') {
        a[i][j] = '#';
        a[i + 1][j] = '#';
        a[i - 1][j] = '#';
        a[i][j - 1] = '#';
        a[i][j + 1] = '#';
        k = k - 5;
      }
    }
  }
  if (k == 0)
    cout << "YES";
  else
    cout << "NO";
}
