#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 100;
const long long INFLL = 1e18 + 100;
const int MAXN = 3e5 + 100;
int a, n, m;
string s;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
  srand(time(NULL));
  if (fopen("sorting"
            ".in",
            "r")) {
    freopen(
        "sorting"
        ".in",
        "r", stdin);
    freopen(
        "sorting"
        ".out",
        "w", stdout);
  }
  cin >> n >> m;
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] >= '0' && s[i] <= '9') ++a;
  }
  if (a != s.size() - 1 || s[a] != '-') {
    cout << "No";
  } else {
    cout << "Yes";
  }
  return 0;
}
