#include <bits/stdc++.h>
using namespace std;
char s[12] = {};
int main() {
  int a, b, n = 0;
  cin >> a >> b;
  getchar();
  for (int i = 1; i <= a + b + 1; i++) {
    s[i] = getchar();
  }
  for (int i = 1; i <= a; i++) {
    if (s[i] < '0' || s[i] > '9') {
      cout << "no";
      return 0;
    }
  }
  if (s[a + 1] != '-') {
    cout << "no";
    return 0;
  }
  for (int i = a + 2; i <= b + a + 1; i++) {
    if (s[i] < '0' || s[i] > '9') {
      cout << "no";
      return 0;
    }
  }
  cout << "yes";
}
