#include <bits/stdc++.h>
using namespace std;
signed main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool ans = true;
  for (int i = 0; i < a; i++)
    if (s[i] == '-') ans = false;
  if (s[a] != '-') ans = false;
  for (int i = a + 1; i < b; i++)
    if (s[i] == '-') ans = false;
  cout << (ans ? "Yes" : "No") << endl;
}
