#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  char n[20];
  cin >> n;
  int l = strlen(n);
  if (l != a + b + 1 || n[a] != '-') cout << "No" << endl, exit(0);
  for (int i = 0; i < l && i != a; i++)
    if (!isdigit(n[i])) cout << "No" << endl, exit(0);
  cout << "Yes" << endl;
}
