#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
long long int N, M, K, H, W, L, R;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> M;
  string s;
  cin >> s;
  for (int i = 0; i < N; i++) {
    if (s[i] < '9' || s[i] < '0') {
      cout << "No\n";
      return 0;
    }
  }
  if (s[N] != '-') {
    cout << "No\n";
    return 0;
  }
  for (int i = N + 1; i < 1 + N + M; i++) {
    if (s[i] < '9' || s[i] < '0') {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  return 0;
}
