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