#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count_NO = 0;
  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 - 2; i++) {
    for (int j = 0; j < n - 2; j++) {
      if (arr[i][j + 1] == '.' && arr[i + 1][j] == '.' &&
          arr[i + 1][j + 1] == '.' && arr[i + 1][j + 2] == '.' &&
          arr[i + 2][j + 1] == '.') {
        arr[i][j + 1] = arr[i + 1][j] = arr[i + 1][j + 1] = arr[i + 1][j + 2] =
            arr[i + 2][j + 1] = '#';
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (arr[i][j] == '.') {
        count_NO++;
      }
    }
  }
  if (count_NO > 0) {
    cout << "NO";
  } else {
    cout << "YES";
  }
  return 0;
}
