#include <bits/stdc++.h>
using namespace std;
int main() {
  int p[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  int res = 0;
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  for (int i = 0; i <= s.size(); i++) {
    if (s[i] == '-') res++;
  }
  for (int i = 0; i <= 10; i++)
    if (res != 1 or s[A] == p[i] or s.size() != A + B + 1) {
      cout << "NO";
      system("pause");
      return 0;
    }
  cout << "YES";
  system("pause");
  return 0;
}
