#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  bool flag = true;
  cin >> a >> b;
  string str;
  cin >> str;
  for (int i = 0; i < a + b + 1; i++) {
    if ((i == a && str[i] != '-') || (i != a && (str[i] < 48 || str[i] > 57))) {
      cout << i << "\n";
      flag = false;
      break;
    }
  }
  if (flag)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
