#include <bits/stdc++.h>
using namespace std;
bool isnum(char c) {
  string n = "0123456789";
  for (int i = 0, i_len = (10); i < i_len; ++i) {
    if (c == n[i]) return true;
  }
  return false;
}
int main(int argc, char* argv[]) {
  int A, B;
  string S;
  string n = "0123456789";
  bool ans = true;
  cin >> A >> B >> S;
  for (int i = 0, i_len = (A); i < i_len; ++i) {
    ans ^= isnum(S[i]);
  }
  for (int i = 0, i_len = (B); i < i_len; ++i) {
    ans ^= isnum(S[A + 1 + i]);
  }
  ans ^= (S[A] == '-');
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
