#include <bits/stdc++.h>
using namespace std;
static const long long maxLL = (long long)1 << 62;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool can = true;
  for (int i = 0; i < a; i++)
    if (!('0' <= s[i] && s[i] <= '9')) can = false;
  if (s[a] != '-') can = false;
  for (int i = a + 1; i < b + 1; i++)
    if (!('0' <= s[i] && s[i] <= '9')) can = false;
  if (can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
