#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long longinf = 1LL << 60;
const long long mod = 1e9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  int M;
  cin >> M;
  string S;
  cin >> S;
  int a[N];
  int b[M];
  for (int i = 0; i < N; i++) {
    a[i] = S.at(i) - 48;
    cout << a[i] << endl;
  }
  char C;
  C = S.at(N);
  cout << C << endl;
  for (int i = 0; i < M; i++) {
    b[i] = S.at(N + 1 + i) - 48;
    cout << b[i] << endl;
  }
  string ans = "No";
  if (C != '-') goto solve;
  for (int i = 0; i < N; i++) {
    if (a[i] - 10 <= 0) {
      ans = "Yes";
    } else {
      ans = "No";
      goto solve;
    }
  }
  for (int i = 0; i < M; i++) {
    if (b[i] - 10 <= 0) {
      ans = "Yes";
    } else {
      ans = "No";
      goto solve;
    }
  }
solve:
  cout << ans << endl;
}
