#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool isNumber(string line) { return (atoi(line.c_str())); }
int main() {
  ll a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  string x = s.substr(0, a), y = s.substr(a + 1, b);
  char z = s[a];
  cout << isNumber(x) << " " << isNumber(y) << endl;
  if (isNumber(x) && isNumber(y) && z == '-')
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
