#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 0, d = 0, a;
  cin >> n;
  char arr[52][52] = {};
  for (int i = 0; i < n; ++i) {
    for (int x = 0; x < n; ++x) {
      cin >> arr[i][x];
      if (arr[i][x] == '.') d++;
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int x = 0; x < n; ++x)
      if (arr[i][x] == '.') {
        if (arr[i][x + 1] == '.' && arr[i][x - 1] == '.' &&
            arr[i + 1][x] == '.' && arr[i - 1][x] == '.') {
          arr[i][x] = '#', arr[i][x + 1] = '.', arr[i][x - 1] = '#',
          arr[i + 1][x] = '#', arr[i - 1][x] == '#';
          c++;
        }
      }
  }
  a = c * 5;
  if (a == d)
    cout << "YES";
  else
    cout << "NO";
}
