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