#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool ok = false;
  if (s[a + 1] == '-') ok = true;
  int cnt = 0;
  for (int i = 0; i < (a + b); i++) {
    if (s[i] == '-') cnt++;
    if (cnt > 1) ok = false;
  }
  if (ok)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
