#include <bits/stdc++.h>
using namespace std;
bool isNum(string s, int start, int length) {
  for (int i = start; i < length; i++) {
    if (s[i] >= '0' && s[i] <= '9') {
      continue;
    }
    return false;
  }
  return true;
}
int main() {
  int A, B;
  string S;
  cin >> A >> B;
  cin >> S;
  if (isNum(S, 0, A) && isNum(S, A + 1, B) && (S[A] == '-')) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
