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