#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B;
  string S, S1, S2, S3;
  
  cin >> A, B;
  cin >> S;
  
  S1 = left(S, A);
  S2 = mid(S, A + 1, 1);
  S3 = right(S, B);
  if S2 <> "-" then cout << "No" << endl; else {
    if len(S1) <> A then cout << "No" << endl; else {
      if len(S2) <> B then cout << "No" << endl; else cout << "Yes" << endl;
    }
  }
}