#include <GLUT/glut.h>
#include <string>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cfloat>
#include <algorithm>
#include <vector>
#include <iostream>
#define PI 3.141592
using namespace std;

int main (){
    int x,y;
    char num[11] = "0123456789";
    char hypn[2] = "-";
    cin >> x >> y;

    char s[x+y+2];

    for (int i=0;i<x+y+1;i++){
        cin >> s[i];
    }

    // for (int i=0;i<x+y+1;i++){
    //     cout <<  s[i];
    // }cout << "\n";
int w,z=0;
w = 0;
    for(int i = 0;i<x+y+1;i++){
        if(i == x){
            if(s[i] == hypn[0]){
                z++;
            }
        }
        for(int j=0;j<10;j++){

            if(s[i] == num[j]){
                w++;
            }
        }
    }
    //cout << w <<" "<< z << "\n";
    if(w == x+y && z == 1){
        cout << "Yes\n";
    }else{
        cout << "No\n";
    }
}
