#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  int flag = 0;
  for (int i = 0; i < A; i++)
    if (S.at(i) == '-') flag++;
  if (S.at(A) != '-') flag++;
  for (int i = A + 1; i < B; i++)
    if (S.at(i) == '-') flag++;
  if (flag == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
