#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char arr[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i < 1 || j < 1 || j == n - 1 || i == n - 1) continue;
      if (arr[i][j] == '.' && arr[i - 1][j] == '.' && arr[i + 1][j] == '.' &&
          arr[i][j - 1] == '.' && arr[i][j + 1] == '.') {
        arr[i][j] = '#';
        arr[i + 1][j] = '#';
        arr[i - 1][j] = '#';
        arr[i][j + 1] = '#';
        arr[i][j - 1] = '#';
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (arr[i][j] == '.') {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
}
