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