#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int mod = 1000000007;
const int inf = 0x3f3f3f3f;
const int maxn = 2000100;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s[a] != '-') {
    cout << "NO"
         << "\n";
    return 0;
  }
  for (int i = 0; i < int(s.size()); i++) {
    if (i == a) continue;
    if (s[i] >= '0' and s[i] <= '9')
      continue;
    else {
      cout << "No"
           << "\n";
      return 0;
    }
  }
  cout << "Yes"
       << "\n";
  return 0;
}
