#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  string S;
  cin >> A >> B >> S;
  if (S[A] == '-' && S[S.length() - 1 - B == '-']) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
