#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s[a] != '-') {
    cout << "No\n";
    return 0;
  }
  for (auto c : s)
    if (c > '9' || c < '0') {
      cout << "No\n";
      return 0;
    }
  cout << "Yes\n";
  return 0;
}
