#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int a, b, i, j, flag = 0;
  cin >> a >> b;
  string s;
  cin >> s;
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '-') {
      j = i;
    } else if (s[i] <= 48 && s[i] >= 58)
      flag = 1;
  }
  long long int x = s.length() - 1;
  if (j == a && (x - j == b) && flag == 0)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
