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