#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  string str;
  while (t--) {
    cin >> str;
    if (str.length() < 2 || str.length() % 2 != 0) {
      cout << "NO" << endl;
      continue;
    }
    int left = 0;
    int right = str.length() / 2;
    bool flag = true;
    while (right < str.length()) {
      if (str[left++] != str[right++]) {
        cout << "NO" << endl;
        flag = false;
        break;
      }
    }
    if (right >= str.length() && flag) {
      cout << "YES" << endl;
    }
  }
  return 0;
}
