#include <bits/stdc++.h>
using namespace std;
int64_t MOD = 1000000007;
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  bool ans = true;
  for (int i = 0; i < (int)(A + B + 1); i++) {
    if (i == A + 1 && S.at(i) != '-') ans = false;
    if (i != A + 1 && S.at(i) == '-') ans = false;
  }
  if (ans)
    cout << "Yes";
  else
    cout << "No";
}
