#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
	int A, B;
	string S;
	int check = 1;
	cin >> A >> B >> S;
	for (int i = 0; i < A; i++) {
		if (S[i] < 48) check = 0;
	}
	if (S[A] != '-') check = 0;
	for (int i = A + 1; i < B + A + 1; i++) {
		if (S[i] < 48) check = 0;
	}
	if (check == 1) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++) 
#define all(v) begin(v),end(v)
using ll = long long;

int main() {
  int a,b,k;cin>>a>>b>>k;
  rep(i,k){
    if(i%2==0){
      if(a%2==1){
        a--;
      }
      a/=2;
      b+=a;
    }
    else {
      if(b%2==1){
        b--;
      }
      b/=2;
      a+=b;
    }
  }
  cout<<a<<" "<<b<<endl;
}