#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  string S;
  int flag = 0;
  cin >> A >> B >> S;
  if (S.size() != A + B + 1)
    flag = 1;
  else {
    for (int i = 0; i < A; i++) {
      if (S[i] < 1 || S[i] > 9) flag = 1;
    }
    if (S[A] != '-') flag = 1;
    for (int j = 0; j < B; j++) {
      if (S[j + A + 2] < 1 || S[j + A + 2] > 9) flag = 1;
    }
  }
  if (flag == 0)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
