#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  bool flag = true;
  if (s.size() != a + b + 1) flag = false;
  for (int i = 0; flag && i < a; i++)
    if (s.at(i) == '-') flag = false;
  if (s.at(a) != '-') flag = false;
  for (int i = a + 1; flag && i < b; i++)
    if (s.at(i) == '-') flag = false;
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
