#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
int main() {
  int a, b = 0;
  string s = "";
  cin >> a >> b >> s;
  if (s[a] != '-') {
    cout << ("NO") << "\n";
    return 0;
  }
  for (int i = 0; i < (s.length()); ++i) {
    if (i == a) {
      continue;
    }
    int num = s[i] - '0';
    if (!(0 <= num && num <= 9)) {
      cout << ("NO") << "\n";
      return 0;
    }
  }
  cout << ("Yes") << "\n";
  return 0;
}
