#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int a, b, stop = -1;
  string s;
  bool ans = false;
  cin >> a >> b;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') stop = i;
  }
  if (stop == a and s.size() - stop - 1 == b) ans = true;
  if (ans)
    cout << "Yes\n";
  else
    cout << "No\n";
}
