#include <bits/stdc++.h>
using namespace std;
template <class T>
void chmax(T& a, T b) {
  if (a < b) {
    a = b;
  }
}
template <class T>
void chmin(T& a, T b) {
  if (a > b) {
    a = b;
  }
}
int atcoder() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  bool ans = true;
  for (int i = 0; i < a; ++i) {
    if (s[i] < '0' || s[i] > '9') ans = false;
  }
  if (s[a] != '-') ans = false;
  for (int i = a + 1; i < b; ++i) {
    if (s[i] < '0' || s[i] > '9') ans = false;
  }
  if (ans)
    cout << "Yes"
         << "\n";
  else
    cout << "No"
         << "\n";
  return 0;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  atcoder();
  return 0;
}
