#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, flag = 1;
  char s[12];
  cin >> a >> b;
  scanf("%s", s);
  for (int i = 0; i < a; i++) {
    if (s[i] < '0' || s[i] > '9') flag = 0;
  }
  if (s[a] != '-') flag = 0;
  for (int i = 0; i < b; i++) {
    if (s[i + a] < '0' || s[i + a] > '9') flag = 0;
  }
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
