import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tokenizer = new StringTokenizer(input.readLine());
        int a = Integer.parseInt(tokenizer.nextToken());
        int b = Integer.parseInt(tokenizer.nextToken());
        String word = input.readLine();
        int size = 0;
        boolean correct = true;
        boolean foundMinuse = false;
        for (int i = 0; i < word.length(); i++) {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        }

        if (foundMinuse && size == b){
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tokenizer = new StringTokenizer(input.readLine());
        int a = Integer.parseInt(tokenizer.nextToken());
        int b = Integer.parseInt(tokenizer.nextToken());
        String word = input.readLine();
        int size = 0;
        boolean correct = true;
        boolean foundMinuse = false;
        for (int i = 0; i < word.length(); i++) {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        }

        if (foundMinuse && size == b){
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tokenizer = new StringTokenizer(input.readLine());
        int a = Integer.parseInt(tokenizer.nextToken());
        int b = Integer.parseInt(tokenizer.nextToken());
        String word = input.readLine();
        int size = 0;
        boolean correct = true;
        boolean foundMinuse = false;
        for (int i = 0; i < word.length(); i++) {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        }

        if (foundMinuse && size == b){
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
    } main {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tokenizer = new StringTokenizer(input.readLine());
        int a = Integer.parseInt(tokenizer.nextToken());
        int b = Integer.parseInt(tokenizer.nextToken());
        String word = input.readLine();
        int size = 0;
        boolean correct = true;
        boolean foundMinuse = false;
        for (int i = 0; i < word.length(); i++) {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        }

        if (foundMinuse && size == b){
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) StringTokenizer tokenizer = new StringTokenizer(input.readLine()); tokenizer new StringTokenizer(input.readLine()) int a = Integer.parseInt(tokenizer.nextToken()); a Integer.parseInt(tokenizer.nextToken()) Integer.parseInt Integer tokenizer.nextToken() tokenizer.nextToken tokenizer int b = Integer.parseInt(tokenizer.nextToken()); b Integer.parseInt(tokenizer.nextToken()) Integer.parseInt Integer tokenizer.nextToken() tokenizer.nextToken tokenizer String word = input.readLine(); word input.readLine() input.readLine input int size = 0; size 0 boolean correct = true; correct true boolean foundMinuse = false; foundMinuse false for (int i = 0; i < word.length(); i++) {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        } int i = 0; int i = 0; i 0 i < word.length() i word.length() word.length word i++ i++ i {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        } {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        } if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            } Character.isDigit(word.charAt(i)) Character.isDigit Character word.charAt(i) word.charAt word i {
                size++;
            } size++ size {
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            } if (size != a){
                    correct = false;
                    break;
                } size != a size a {
                    correct = false;
                    break;
                } correct = false correct false break; size = 0 size 0 foundMinuse = true foundMinuse true if (foundMinuse && size == b){
            System.out.println("Yes");
        }else {
            System.out.println("No");
        } foundMinuse && size == b foundMinuse size == b size b {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
    public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tokenizer = new StringTokenizer(input.readLine());
        int a = Integer.parseInt(tokenizer.nextToken());
        int b = Integer.parseInt(tokenizer.nextToken());
        String word = input.readLine();
        int size = 0;
        boolean correct = true;
        boolean foundMinuse = false;
        for (int i = 0; i < word.length(); i++) {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        }

        if (foundMinuse && size == b){
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tokenizer = new StringTokenizer(input.readLine());
        int a = Integer.parseInt(tokenizer.nextToken());
        int b = Integer.parseInt(tokenizer.nextToken());
        String word = input.readLine();
        int size = 0;
        boolean correct = true;
        boolean foundMinuse = false;
        for (int i = 0; i < word.length(); i++) {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        }

        if (foundMinuse && size == b){
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args)throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer tokenizer = new StringTokenizer(input.readLine());
        int a = Integer.parseInt(tokenizer.nextToken());
        int b = Integer.parseInt(tokenizer.nextToken());
        String word = input.readLine();
        int size = 0;
        boolean correct = true;
        boolean foundMinuse = false;
        for (int i = 0; i < word.length(); i++) {
            if (Character.isDigit(word.charAt(i))){
                size++;
            }else{
                if (size != a){
                    correct = false;
                    break;
                }
                size = 0;
                foundMinuse = true;
            }
        }

        if (foundMinuse && size == b){
            System.out.println("Yes");
        }else {
            System.out.println("No");
        }
    }
}
