#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool ans = 1;
  string sa = s.substr(0, a);
  (i, a, b) for (int(i) = a; (i) < (b);
                 ++(i))(i, 0, a) if (sa[i] < '0' || '9' < sa[i]) ans = 0;
  string sb = s.substr(a + 1, b);
  (i, a, b) for (int(i) = a; (i) < (b); ++(i))(
      i, a + 1, a + b + 1) if (sb[i] < '0' || '9' < sb[i]) ans = 0;
  if (s[a] != '-') ans = 0;
  cout << (ans ? "Yes" : "No") << endl;
  return 0;
}
