#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
int main() {
  long long int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  if (S.substr(0, A) != "-" & S[A] == '-' & S.substr(A + 1, B) != "-") {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
