#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b;
  string str;
  cin >> a >> b >> str;
  int flag = 0;
  if (str.length() != a + b + 1 || str[a] != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < a; i++) {
    if (!('0' <= str[i] && str[i] <= '9')) flag = 1;
    break;
  }
  for (int i = a + 1; i < b; i++) {
    if (!('0' <= str[i] && str[i] <= '9')) flag = 1;
    break;
  }
  cout << (flag == 0 ? "Yes" : "No") << endl;
  return 0;
}
