#include <bits/stdc++.h>
using namespace std;
const int MAXN = 50 * 50;
int main() {
  ios_base::sync_with_stdio(0);
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  if (s[A] == '-') {
    for (int i = A + 1; i < s.length(); i++)
      if (!(s[i] >= '0' && s[i] <= '9')) {
        cout << "No";
        break;
      } else if (i == s.length() - 1)
        cout << "Yes";
  } else
    cout << "NO";
  return 0;
}
