#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int A, B;
  string S;
  cin >> A >> B >> S;
  if (S[A] != '-') {
    cout << "NO";
    return 0;
  }
  for (int i = 0; i < A; i++) {
    if (0 <= S[i] - '0' && S[i] - '0' <= 9) {
    } else {
      cout << "NO";
      return 0;
    }
  }
  for (int i = A + 1; i < B; i++) {
    if (0 <= S[i] - '0' && S[i] - '0' <= 9) {
    } else {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
