#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll MOD = 1000000007;
const long long INF = numeric_limits<long long>::max();
int main() {
  ll A, B;
  cin >> A >> B;
  string str;
  cin >> str;
  bool isOk = true;
  do {
    for (ll i = 0; i < (A); i++) {
      isOk &= str[i] != '-';
    }
    if (!isOk) break;
    isOk &= str[A] == '-';
    if (!isOk) break;
    for (ll i = A + 1; i < (B); i++) {
      isOk &= str[i] != '-';
    }
  } while (0);
  cout << (isOk ? "Yes" : "No") << "\n";
  return 0;
}
