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