#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];
  int flag = 0;
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < n - 1; j++) {
      if (arr[i][j] == '.') {
        if (arr[i][j - 1] == '.' && arr[i][j + 1] == '.' &&
            arr[i - 1][j] == '.' && arr[i + 1][j] == '.') {
          arr[i][j - 1] = '#';
          arr[i][j + 1] = '#';
          arr[i - 1][j] = '#';
          arr[i + 1][j] = '#';
          arr[i][j] = '#';
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (arr[i][j] == '.') {
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
  }
  if (flag)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
