#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using namespace std;
void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; }
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
signed main() {
  long long a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  for (long long i = 0; i < a; i++) {
    if (s[i] == '-') {
      No();
      return 0;
    }
  }
  if (s[a] != '-') {
    No();
    return 0;
  }
  for (long long i = 0; i < b; i++) {
    if (s[a + 1 + b] == '-') {
      No();
      return 0;
    }
  }
  Yes();
}
