#include <bits/stdc++.h>
using namespace std;
int A, B;
string a;
int main() {
  cin >> A >> B >> a;
  for (int i = 0; i < A; i++) {
    int x = a[i] - '0';
    if (!(0 <= x && x <= 9)) return puts("No");
  }
  if (a[A] != '-') return puts("No");
  for (int i = A + 1; i < A + B + 1; i++) {
    int x = a[i] - '0';
    if (!(0 <= x && x <= 9)) return puts("No");
  }
  puts("Yes");
  return 0;
}
