#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592654;
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL), cout.tie(NULL);
}
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
int main() {
  fast();
  string s, ss, f, ff;
  int x, y;
  cin >> x >> y >> s;
  int i = 0;
  while (isdigit(s[i]) && i < s.size()) f += s[i], i++;
  while (s[i] == '-' && i < s.size()) ff += s[i], i++;
  while (i < s.size() && isdigit(s[i]) && i < s.size()) ss += s[i], i++;
  if ((f.size() >= x || f.size() >= y) && (ss.size() >= y || ss.size() >= x) &&
      ff.size() == 1)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
