#include <bits/stdc++.h>
using ll = unsigned long long int;
using namespace std;
bool islower(char ch) { return '0' <= ch && ch <= '9'; }
int main() {
  (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false));
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if ((int)s.size() != (a + b + 1)) {
    cout << "No";
    return 0;
  }
  for (int i = 0; i < a; i++) {
    if (!islower(s.at(i))) {
      cout << "No";
      return 0;
    }
  }
  if (s.at(a) != '-') {
    cout << "No";
    return 0;
  }
  for (int i = a + 1; i < b; i++) {
    if (!islower(s.at(i))) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}
