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