#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B;
  string s;
  cin >> A >> B >> s;
  for (int i = 0; i < A+B+1; i++) {
    if((!isdigit(s[i]) && i != A) || (s[A]!='-')) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}