import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int a = in.nextInt();
        int b = in.nextInt();
        String S = in.nextLine();
        boolean hyphen = false;




        int count =0;
        for (int j =0 ; j < S.length()-1; j++ )
        {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        }

        if (count == 1 && S.charAt(a)=='-')
        {
            hyphen = true;
        }

        else
            {
                System.out.println("No");
                System.exit(0);

            }

        if (hyphen == true)
        {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        }
        else
            {
                System.out.println("No");
            }


        }







    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int a = in.nextInt();
        int b = in.nextInt();
        String S = in.nextLine();
        boolean hyphen = false;




        int count =0;
        for (int j =0 ; j < S.length()-1; j++ )
        {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        }

        if (count == 1 && S.charAt(a)=='-')
        {
            hyphen = true;
        }

        else
            {
                System.out.println("No");
                System.exit(0);

            }

        if (hyphen == true)
        {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        }
        else
            {
                System.out.println("No");
            }


        }







    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} Main public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int a = in.nextInt();
        int b = in.nextInt();
        String S = in.nextLine();
        boolean hyphen = false;




        int count =0;
        for (int j =0 ; j < S.length()-1; j++ )
        {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        }

        if (count == 1 && S.charAt(a)=='-')
        {
            hyphen = true;
        }

        else
            {
                System.out.println("No");
                System.exit(0);

            }

        if (hyphen == true)
        {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        }
        else
            {
                System.out.println("No");
            }


        } main {
        FastScanner in = new FastScanner();
        int a = in.nextInt();
        int b = in.nextInt();
        String S = in.nextLine();
        boolean hyphen = false;




        int count =0;
        for (int j =0 ; j < S.length()-1; j++ )
        {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        }

        if (count == 1 && S.charAt(a)=='-')
        {
            hyphen = true;
        }

        else
            {
                System.out.println("No");
                System.exit(0);

            }

        if (hyphen == true)
        {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        }
        else
            {
                System.out.println("No");
            }


        } FastScanner in = new FastScanner(); in new FastScanner() int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in String S = in.nextLine(); S in.nextLine() in.nextLine in boolean hyphen = false; hyphen false int count =0; count 0 for (int j =0 ; j < S.length()-1; j++ )
        {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        } int j =0 ; int j =0 ; j 0 j < S.length()-1 j S.length()-1 S.length() S.length S 1 j++ j++ j {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        } {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        } if(S.charAt(j)=='-')
            {
                count++;
            } S.charAt(j)=='-' S.charAt(j) S.charAt S j '-' {
                count++;
            } count++ count if (count == 1 && S.charAt(a)=='-')
        {
            hyphen = true;
        }

        else
            {
                System.out.println("No");
                System.exit(0);

            } count == 1 && S.charAt(a)=='-' count == 1 count 1 S.charAt(a)=='-' S.charAt(a) S.charAt S a '-' {
            hyphen = true;
        } hyphen = true hyphen true {
                System.out.println("No");
                System.exit(0);

            } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if (hyphen == true)
        {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        }
        else
            {
                System.out.println("No");
            } hyphen == true hyphen true {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        } if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            } S.length()-2 == a+b-1 S.length()-2 S.length() S.length S 2 a+b-1 a+b a b 1 {
                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 static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    } FastScanner BufferedReader br; br StringTokenizer st; st public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        } FastScanner {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        } try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } FileNotFoundException e {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                br = new BufferedReader(new FileReader(s));
            } br = new BufferedReader(new FileReader(s)) br new BufferedReader(new FileReader(s)) String s s public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        } FastScanner {
            br = new BufferedReader(new InputStreamReader(System.in));
        } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } nextToken {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } IOException e {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        } nextLine {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        } st = null st null try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } IOException e {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                return br.readLine();
            } return br.readLine(); br.readLine() br.readLine br return null; null int nextInt() {
            return Integer.parseInt(nextToken());
        } nextInt {
            return Integer.parseInt(nextToken());
        } return Integer.parseInt(nextToken()); Integer.parseInt(nextToken()) Integer.parseInt Integer nextToken() nextToken long nextLong() {
            return Long.parseLong(nextToken());
        } nextLong {
            return Long.parseLong(nextToken());
        } return Long.parseLong(nextToken()); Long.parseLong(nextToken()) Long.parseLong Long nextToken() nextToken double nextDouble() {
            return Double.parseDouble(nextToken());
        } nextDouble {
            return Double.parseDouble(nextToken());
        } return Double.parseDouble(nextToken()); Double.parseDouble(nextToken()) Double.parseDouble Double nextToken() nextToken public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int a = in.nextInt();
        int b = in.nextInt();
        String S = in.nextLine();
        boolean hyphen = false;




        int count =0;
        for (int j =0 ; j < S.length()-1; j++ )
        {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        }

        if (count == 1 && S.charAt(a)=='-')
        {
            hyphen = true;
        }

        else
            {
                System.out.println("No");
                System.exit(0);

            }

        if (hyphen == true)
        {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        }
        else
            {
                System.out.println("No");
            }


        }







    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int a = in.nextInt();
        int b = in.nextInt();
        String S = in.nextLine();
        boolean hyphen = false;




        int count =0;
        for (int j =0 ; j < S.length()-1; j++ )
        {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        }

        if (count == 1 && S.charAt(a)=='-')
        {
            hyphen = true;
        }

        else
            {
                System.out.println("No");
                System.exit(0);

            }

        if (hyphen == true)
        {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        }
        else
            {
                System.out.println("No");
            }


        }







    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} Main
import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int a = in.nextInt();
        int b = in.nextInt();
        String S = in.nextLine();
        boolean hyphen = false;




        int count =0;
        for (int j =0 ; j < S.length()-1; j++ )
        {
            if(S.charAt(j)=='-')
            {
                count++;
            }
        }

        if (count == 1 && S.charAt(a)=='-')
        {
            hyphen = true;
        }

        else
            {
                System.out.println("No");
                System.exit(0);

            }

        if (hyphen == true)
        {
            if (S.length()-2 == a+b-1)
            {
                System.out.println("Yes");
            }
        }
        else
            {
                System.out.println("No");
            }


        }







    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}
