import java.util.*;

public class Main {
    public static void main(String[] args)  {

        Scanner sc = new Scanner(System.in);
        boolean result = check(sc);

        toPrint(result);

    }

    public static void toPrint(boolean result) {
        if(result){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static boolean check(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String code = sc.next();
        if(code.charAt(a) != '-' )
            return false;
        for(int i = 0; i < code.length(); i++){
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        }

        return true;
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args)  {

        Scanner sc = new Scanner(System.in);
        boolean result = check(sc);

        toPrint(result);

    }

    public static void toPrint(boolean result) {
        if(result){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static boolean check(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String code = sc.next();
        if(code.charAt(a) != '-' )
            return false;
        for(int i = 0; i < code.length(); i++){
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        }

        return true;
    }
} Main public static void main(String[] args)  {

        Scanner sc = new Scanner(System.in);
        boolean result = check(sc);

        toPrint(result);

    } main {

        Scanner sc = new Scanner(System.in);
        boolean result = check(sc);

        toPrint(result);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean result = check(sc); result check(sc) check sc toPrint(result) toPrint result String[] args args public static void toPrint(boolean result) {
        if(result){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } toPrint {
        if(result){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } if(result){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } result {
            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" boolean result result public static boolean check(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String code = sc.next();
        if(code.charAt(a) != '-' )
            return false;
        for(int i = 0; i < code.length(); i++){
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        }

        return true;
    } check {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String code = sc.next();
        if(code.charAt(a) != '-' )
            return false;
        for(int i = 0; i < code.length(); i++){
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        }

        return true;
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String code = sc.next(); code sc.next() sc.next sc if(code.charAt(a) != '-' )
            return false; code.charAt(a) != '-' code.charAt(a) code.charAt code a '-' return false; false for(int i = 0; i < code.length(); i++){
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        } int i = 0; int i = 0; i 0 i < code.length() i code.length() code.length code i++ i++ i {
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        } {
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        } if(i == a) continue; i == a i a continue; if(!Character.isDigit(code.charAt(i))) return false; !Character.isDigit(code.charAt(i)) Character.isDigit(code.charAt(i)) Character.isDigit Character code.charAt(i) code.charAt code i return false; false return true; true Scanner sc sc public class Main {
    public static void main(String[] args)  {

        Scanner sc = new Scanner(System.in);
        boolean result = check(sc);

        toPrint(result);

    }

    public static void toPrint(boolean result) {
        if(result){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static boolean check(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String code = sc.next();
        if(code.charAt(a) != '-' )
            return false;
        for(int i = 0; i < code.length(); i++){
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        }

        return true;
    }
} public class Main {
    public static void main(String[] args)  {

        Scanner sc = new Scanner(System.in);
        boolean result = check(sc);

        toPrint(result);

    }

    public static void toPrint(boolean result) {
        if(result){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static boolean check(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String code = sc.next();
        if(code.charAt(a) != '-' )
            return false;
        for(int i = 0; i < code.length(); i++){
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        }

        return true;
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args)  {

        Scanner sc = new Scanner(System.in);
        boolean result = check(sc);

        toPrint(result);

    }

    public static void toPrint(boolean result) {
        if(result){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    public static boolean check(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String code = sc.next();
        if(code.charAt(a) != '-' )
            return false;
        for(int i = 0; i < code.length(); i++){
            if(i == a) continue;
            if(!Character.isDigit(code.charAt(i))) return false;
        }

        return true;
    }
}
