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