#include <bits/stdc++.h>
using namespace std;
int a, b, sum;
char s, k;
int main() {
  scanf("%d%d", &a, &b);
  for (int i = 1; i <= a + b + 1; i++) {
    cin >> s;
    if (!(i != a + 1 && s >= '0' && s <= '9')) {
      printf("No");
      return 0;
    }
    if (i == a + 1) k = s;
  }
  if (k == '-')
    printf("No\n");
  else
    printf("Yes\n");
  return 0;
}
