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