use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let a: usize = read();
    let b: usize = read();
    let mut s: Vec<char> = read::<String>().chars().collect();
    let mut hidx: i64 = -1;
    for i in 0..s.len() {
        if s[i] == '-' {
            if hidx == -1 {
                hidx = i as i64;
            } else {
                println!("No");
                return;
            }
        }
    }

    let back = s.split_off(hidx as usize);
    if back.len() - 1 == b && s.len() == a {
        println!("Yes")
    } else {
        println!("No")
    }
}
