fn get_input() -> String {
    let mut word = String::new();
    std::io::stdin().read_line(&mut word).unwrap();
    word.trim().to_owned()
}

fn main() {
    let (a, b) = {
        let line = get_input();
        let mut split = line.split_whitespace();
        let a: usize = split.next().unwrap().parse().unwrap();
        let b: usize = split.next().unwrap().parse().unwrap();
        (a, b)
    };

    let s = get_input();

    let s1 = &s[0..a];
    let s2 = &s[a..s.len()-b];
    let s3 = &s[s.len()-b..];

    if s1.parse::<u64>().is_ok() && s2 == "-" && s3.parse::<u64>().is_ok() {
        println!("Yes");
    } else {
        println!("No");
    }
}