#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ll LINF = 0x1fffffffffffffff;
const int INF = 0x3fffffff;
const int MOD = 1000000007;
void in() {}
template <class T, class... U>
void in(T &t, U &...u) {
  cin >> t;
  in(u...);
}
void out() {}
template <class T, class... U>
void out(T t, U... u) {
  cout << t << " ";
  out(u...);
}
void solve();
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  solve();
}
void solve() {
  int A, B;
  in(A, B);
  string S;
  in(S);
  for (int i = (0); i < (A); ++i) {
    if (S[i] < '0' && S[i] > '9') {
      out("No");
      cout << endl;
      return;
    }
  }
  if (S[A] != '-') {
    out("No");
    cout << endl;
    return;
  }
  for (int i = (A + 1); i < (A + 1 + B); ++i) {
    if (S[i] < '0' && S[i] > '9') {
      out("No");
      cout << endl;
      return;
    }
  }
  out("Yes");
  cout << endl;
}
