#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long LINF = 1LL << 60;
const int INF = 1 << 30;
int main() {
  int a, b;
  string S;
  cin >> a >> b >> S;
  int l = 0, r = 0;
  int i = 0;
  while (S[i] != '-') {
    l++;
    i++;
  }
  r = S.size() - l - 1;
  if (l == a && r == b) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
