#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
const long long int INF = (long long int)1e15;
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  string a = "Yes";
  for (long long int(i) = (0); (i) < (A); ++(i)) {
    if (S[i] - '0' >= 0 && S[i] - '0' <= 9) continue;
    a = "No";
  }
  for (long long int(i) = (0); (i) < (B); ++(i)) {
    if (S[i + A + 1] - '0' >= 0 && S[i + A + 1] <= 9) continue;
    a = "No";
  }
  if (S[A] != '-') a = "No";
  cout << a << endl;
  return 0;
}
