#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  int A, B;
  string S;
  int count = 0;
  int i = 0;
  cin >> A >> B;
  cin >> S;
  int x = 1;
  while (S[i]) {
    if (S[i] == '-' && i != A) {
      x = 0;
    }
    count++;
    i++;
  }
  if (count == B + A + 1 && x == 1) {
    cout << "Yes";
  } else {
    cout << "Np";
  }
}
