#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  string s;
  cin >> a >> b >> s;
  if (s[a] != '-') {
    cout << "No\n";
    return 0;
  }
  for (int i = 0; i < (int)(a); ++i) {
    if (!('0' <= s[i] && s[i] <= '9')) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  return 0;
}
