#include <bits/stdc++.h>
using namespace std;
int A, B;
string S;
int main() {
  cin >> A >> B;
  cin >> S;
  if (S[A] == '-' && S.size() == (A + B + 1))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
