#include <bits/stdc++.h>
using namespace std;
inline int input() {
  int n;
  scanf("%d", &n);
  return n;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  int n;
  cin >> n;
  string s;
  cin >> s;
  bool ok = false;
  for (int i = (0); i < ((int)s.size()); i++) {
    if (s[i] != s[(int)s.size() - i - 1]) {
      ok = false;
      break;
    } else {
      ok = true;
      break;
    }
  }
  cout << ((ok) ? "Yes" : "No") << '\n';
  return 0;
}
