#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  int N = a + b + 1;
  bool can = true;
  for (int i = 0; i < a; i++) {
    if (!(0 <= s[i] && s[i] <= 9)) can = false;
  }
  if (s[a] != '-') can = false;
  for (int i = a + 1; i <= a + b; i++) {
    if (!(0 <= s[i] && s[i] <= 9)) can = false;
  }
  if (can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
