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

int main() {
  int A, B;
  string S;
  cin >> A >> B >> S;
  regex re(R"(\d+)");
  if(regex_match(S.substr(0,A),re) && S.at(A)=='-' && regex_match(S.substr(A+1,B),re)) cout << "Yes" << endl;
  else cout << "No" << endl;
}