import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        if(s.charAt(a)!='-')
        {
            System.out.println("No");
            return;
        }
        for(int i=0;i<a;i++)
        {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        for(int j=a+1;j<a+b+1;j++)
        {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }    
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        if(s.charAt(a)!='-')
        {
            System.out.println("No");
            return;
        }
        for(int i=0;i<a;i++)
        {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        for(int j=a+1;j<a+b+1;j++)
        {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }    
} Main public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        if(s.charAt(a)!='-')
        {
            System.out.println("No");
            return;
        }
        for(int i=0;i<a;i++)
        {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        for(int j=a+1;j<a+b+1;j++)
        {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } main {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        if(s.charAt(a)!='-')
        {
            System.out.println("No");
            return;
        }
        for(int i=0;i<a;i++)
        {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        for(int j=a+1;j<a+b+1;j++)
        {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan if(s.charAt(a)!='-')
        {
            System.out.println("No");
            return;
        } s.charAt(a)!='-' s.charAt(a) s.charAt s a '-' {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for(int i=0;i<a;i++)
        {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        } {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        } if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            } s.charAt(i)=='-' s.charAt(i) s.charAt s i '-' {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; for(int j=a+1;j<a+b+1;j++)
        {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        } int j=a+1; int j=a+1; j a+1 a 1 j<a+b+1 j a+b+1 a+b+1 a b 1 j++ j++ j {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        } {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        } if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            } s.charAt(j)=='-' s.charAt(j) s.charAt s j '-' {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; 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) throws Exception {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        if(s.charAt(a)!='-')
        {
            System.out.println("No");
            return;
        }
        for(int i=0;i<a;i++)
        {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        for(int j=a+1;j<a+b+1;j++)
        {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }    
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        if(s.charAt(a)!='-')
        {
            System.out.println("No");
            return;
        }
        for(int i=0;i<a;i++)
        {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        for(int j=a+1;j<a+b+1;j++)
        {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }    
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        if(s.charAt(a)!='-')
        {
            System.out.println("No");
            return;
        }
        for(int i=0;i<a;i++)
        {
            if(s.charAt(i)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        for(int j=a+1;j<a+b+1;j++)
        {
            if(s.charAt(j)=='-')
            {
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }    
}