#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  bool ans = true;
  for (int i = 0; i < A; i++)
    if (s[i] < '0' || '9' < s[i]) ans = false;
  if (s[A] != '-') ans = false;
  for (int i = A + 1; i < B; i++)
    if (s[i] < '0' || '9' < s[i]) ans = false;
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
