#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  int c = s.length();
  bool number_a = true;
  for (int i = 0; i < a; i++)
    if (s[i] == '-') number_a = false;
  bool number_b = true;
  for (int i = a + 1; i <= b; i++)
    if (s[i] == '-') number_b = false;
  if (c == a + b + 1 && s[a] == '-' && number_a == false && number_b == false)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
