#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  string S;
  cin >> N >> M >> S;
  int count = 0;
  if (S.at(N + 1) == '-') {
    count = 1;
  }
  for (int i = 0; i < N; i++) {
    if (S.at(i) == '1' || S.at(i) == '2' || S.at(i) == '3' || S.at(i) == '4' ||
        S.at(i) == '5' || S.at(i) == '6' || S.at(i) == '7' || S.at(i) == '8' ||
        S.at(i) == '9') {
      count++;
    }
  }
  for (int i = N + 1; i < M + N + 1; i++) {
    if (S.at(i) == '1' || S.at(i) == '2' || S.at(i) == '3' || S.at(i) == '4' ||
        S.at(i) == '5' || S.at(i) == '6' || S.at(i) == '7' || S.at(i) == '8' ||
        S.at(i) == '9') {
      count++;
    }
  }
  if (N + M + 1 == count) {
    cout << "Yes" << endl;
  } else
    cout << "No" << endl;
  cout << count;
}
