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