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