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