#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, arr[250], h = 0, n = 0, m = 0;
  arr['-'] = 0;
  cin >> a >> b;
  string s;
  cin >> s;
  int i = 0;
  while (isdigit(s[i])) n++, i++;
  if (n != a) {
    cout << "No" << endl;
    return 0;
  }
  while (!isdigit(s[i])) h++, i++;
  if (h != 1) {
    cout << "No" << endl;
    return 0;
  }
  while (isdigit(s[i])) m++, i++;
  if (b != m) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  return 0;
}
