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