import java.util.*;
  
public class Main{

     public static void main(String []args){
        Scanner sc = new Scanner(System.in);
     
        char[] c = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        String S;
        int A, B;
        boolean answer = false;
      
        A = sc.nextInt();
        B = sc.nextInt();
        S = sc.next();
        
         String[] sol = S.split("-");
         if(sol.length != 2){
             System.out.println("No");
             return;
         }
         for(int k = 0; k<=1; k++){
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         }

        if(sol[0].length() != A || sol[1].length() != B || answer == false)
            System.out.println("No");
        
        else
            System.out.println("Yes");
     }
} import java.util.*; util.* java public class Main{

     public static void main(String []args){
        Scanner sc = new Scanner(System.in);
     
        char[] c = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        String S;
        int A, B;
        boolean answer = false;
      
        A = sc.nextInt();
        B = sc.nextInt();
        S = sc.next();
        
         String[] sol = S.split("-");
         if(sol.length != 2){
             System.out.println("No");
             return;
         }
         for(int k = 0; k<=1; k++){
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         }

        if(sol[0].length() != A || sol[1].length() != B || answer == false)
            System.out.println("No");
        
        else
            System.out.println("Yes");
     }
} Main public static void main(String []args){
        Scanner sc = new Scanner(System.in);
     
        char[] c = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        String S;
        int A, B;
        boolean answer = false;
      
        A = sc.nextInt();
        B = sc.nextInt();
        S = sc.next();
        
         String[] sol = S.split("-");
         if(sol.length != 2){
             System.out.println("No");
             return;
         }
         for(int k = 0; k<=1; k++){
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         }

        if(sol[0].length() != A || sol[1].length() != B || answer == false)
            System.out.println("No");
        
        else
            System.out.println("Yes");
     } main {
        Scanner sc = new Scanner(System.in);
     
        char[] c = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        String S;
        int A, B;
        boolean answer = false;
      
        A = sc.nextInt();
        B = sc.nextInt();
        S = sc.next();
        
         String[] sol = S.split("-");
         if(sol.length != 2){
             System.out.println("No");
             return;
         }
         for(int k = 0; k<=1; k++){
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         }

        if(sol[0].length() != A || sol[1].length() != B || answer == false)
            System.out.println("No");
        
        else
            System.out.println("Yes");
     } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] c = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; c {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' String S; S int A A B; B boolean answer = false; answer false A = sc.nextInt() A sc.nextInt() sc.nextInt sc B = sc.nextInt() B sc.nextInt() sc.nextInt sc S = sc.next() S sc.next() sc.next sc String[] sol = S.split("-"); sol S.split("-") S.split S "-" if(sol.length != 2){
             System.out.println("No");
             return;
         } sol.length != 2 sol.length sol sol.length 2 {
             System.out.println("No");
             return;
         } System.out.println("No") System.out.println System.out System System.out "No" return; for(int k = 0; k<=1; k++){
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         } int k = 0; int k = 0; k 0 k<=1 k 1 k++ k++ k {
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         } {
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         } for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             } int i = 0; int i = 0; i 0 i<sol[0].length() i sol[0].length() sol[0].length sol[0] sol 0 i++ i++ i {
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             } {
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             } for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 } int j = 0; int j = 0; j 0 j<c.length j c.length c c.length j++ j++ j {
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 } {
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 } if(sol[0].charAt(i) == c[j])
                        answer = true; sol[0].charAt(i) == c[j] sol[0].charAt(i) sol[0].charAt sol[0] sol 0 i c[j] c j answer = true answer true continue; if(sol[0].length() != A || sol[1].length() != B || answer == false)
            System.out.println("No");
        
        else
            System.out.println("Yes"); sol[0].length() != A || sol[1].length() != B || answer == false sol[0].length() != A || sol[1].length() != B || answer == false sol[0].length() != A sol[0].length() sol[0].length sol[0] sol 0 A sol[1].length() != B sol[1].length() sol[1].length sol[1] sol 1 B answer == false answer false System.out.println("No") System.out.println System.out System System.out "No" System.out.println("Yes") System.out.println System.out System System.out "Yes" String []args args public class Main{

     public static void main(String []args){
        Scanner sc = new Scanner(System.in);
     
        char[] c = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        String S;
        int A, B;
        boolean answer = false;
      
        A = sc.nextInt();
        B = sc.nextInt();
        S = sc.next();
        
         String[] sol = S.split("-");
         if(sol.length != 2){
             System.out.println("No");
             return;
         }
         for(int k = 0; k<=1; k++){
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         }

        if(sol[0].length() != A || sol[1].length() != B || answer == false)
            System.out.println("No");
        
        else
            System.out.println("Yes");
     }
} public class Main{

     public static void main(String []args){
        Scanner sc = new Scanner(System.in);
     
        char[] c = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        String S;
        int A, B;
        boolean answer = false;
      
        A = sc.nextInt();
        B = sc.nextInt();
        S = sc.next();
        
         String[] sol = S.split("-");
         if(sol.length != 2){
             System.out.println("No");
             return;
         }
         for(int k = 0; k<=1; k++){
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         }

        if(sol[0].length() != A || sol[1].length() != B || answer == false)
            System.out.println("No");
        
        else
            System.out.println("Yes");
     }
} Main
import java.util.*;
  
public class Main{

     public static void main(String []args){
        Scanner sc = new Scanner(System.in);
     
        char[] c = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        String S;
        int A, B;
        boolean answer = false;
      
        A = sc.nextInt();
        B = sc.nextInt();
        S = sc.next();
        
         String[] sol = S.split("-");
         if(sol.length != 2){
             System.out.println("No");
             return;
         }
         for(int k = 0; k<=1; k++){
             for(int i = 0; i<sol[0].length(); i++){
                 for(int j = 0; j<c.length; j++){
                    if(sol[0].charAt(i) == c[j])
                        answer = true;
                        continue;
                 }
             }
         }

        if(sol[0].length() != A || sol[1].length() != B || answer == false)
            System.out.println("No");
        
        else
            System.out.println("Yes");
     }
}