#include <bits/stdc++.h>
using namespace std;
char a[10005];
int x, y, vis;
int main() {
  scanf("%d%d", &x, &y);
  scanf("%s", a + 1);
  for (int i = 1; i <= x; i++) {
    if (a[i] > '9' || a[i] < '0') vis = 1;
  }
  if (a[x + 1] != '-') vis = 1;
  for (int i = x + 2; i <= y + x + 1; i++) {
    if (a[i] > '9' || a[i] < '0') vis = 1;
  }
  if (vis == 1)
    cout << "No";
  else
    cout << "No";
  return 0;
}
