#include <bits/stdc++.h>
int main() {
  char s[15];
  int a = 0;
  int b = 0;
  scanf("%d %d", &a, &b);
  for (int i = 0; i < 15; i++) {
    s[i] = 'x';
  }
  scanf("%s", s);
  int size = 0;
  int hifn = 0;
  for (int i = 0; i < 15; i++) {
    if (s[i] != 'x') {
      size++;
    }
  }
  for (int i = 0; i < 15; i++) {
    if (s[i] == '-') {
      hifn++;
    }
  }
  size--;
  printf("%d %d\n", size, hifn);
  if (size == a + b + 1 && hifn == 1 && s[a] == '-') {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}
