jiahuimbzuai/CoQuIR huggingface dataset:
//  [cpp]
#include "bits/stdc++.h"
using namespace std;

#define ll long long int
#define str string

ll MOD = 1000000007, INFL = 1ll << 60, INF = 1 << 30;
pair <ll, ll> A[10000000] = {}, X[1000000] = {};
int dy[] = { 0, 0, 1, -1 }, dx[] = { 1, -1, 0, 0 };
vector <ll> v;
ll a = 0, b = 0, c = 0, n = 0, sum = 0, max = INF;
str S;
ll ans = 0;

int findDigits(int n) {
	int i = 0;
	while (n > 0) {

		sum += n % 10;
		n /= 10;
		i++;
	}
	return i;
}


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	//Code Line
	cin >> A[0].second >> A[1].second >> A[2].second >> A[3].second >> A[4].second;
	for (int i = 0; i < 5; i++) {
		A[i].first = A[i].second % 10;
		if (A[i].second % 10 == 0)A[i].first = 100;
	}
	sort(A, A + 5);
	for (int i = 4; i > 0; i--) {
		if (A[i].second % 10 != 0) {
			A[i].second = A[i].second / 10;
			A[i].second *= 10;
			A[i].second += 10;
		}
		else {
			A[i].second = A[i].second / 10;
			A[i].second *= 10;
		}
		ans += A[i].second;
	}
	cout << ans + A[0].second << endl;
	cin >> n;
	//Code Line
	return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define rep(i,n) for(int i=0;i<n;i++)
int gcd(int a, int b){
    int r=1;
    while(r!=0){
        r=a%b;
        a=b;
        b=r;
    }
    return a;
}
void revStr(char* str){
    int size = strlen(str);
    int i,j;
    char tmp = {0};
    for(i = 0, j = size - 1; i < size / 2; i++, j--){
        tmp = str[i];
        str[i] = str[j];
        str[j] = tmp;
    }return;
}
typedef struct{
    int a,b;
}data;

//昇順
int compare_int(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}
//構造体降順
int comp( const void *c1, const void *c2 )
{
  data test1 = *(data *)c1;
  data test2 = *(data *)c2;
  int tmp1 = test1.b;   /* b を基準とする */
  int tmp2 = test2.b;
  return tmp2 - tmp1;
}


int kai(int n){
    if(n==0){
        return 1;
    }
    int sum=1;
    for(int i=1;i<=n;i++){
        sum*=i;
    }
    return sum;
}

int main(){
    int a[5];
    int b[5];
    for(int i=0;i<5;i++){
        scanf("%d",&a[i]);
    }
    for(int i=0;i<5;i++){
        b[i]=a[i];
    }
    for(int i=0;i<5;i++){
        while((a[i]%10)!=0){
            a[i]++;
        }
    }
    int min=100000;
    for(int i=0;i<5;i++){
        int sum=0;
        for(int j=0;j<5;j++){
            if(j==i){
                sum+=b[j];
            }else{
                sum+=a[j];
            }
        }
        if(min>sum){
            min=sum;
        }
    }
    printf("%d",min);
}
//  [c]
#include<stdio.h>

int main(){

int A,B,C,D,E;
int ans=0,min=10;
scanf("%d%d%d%d%d",&A,&B,&C,&D,&E);

if (A%10==0){ans += A;}else{ ans += (A + 10-(A%10)); if (min>A%10){min = A%10;}}
if (B%10==0){ans += B;}else{ ans += (B + 10-(B%10)); if (min>B%10){min = B%10;}}
if (C%10==0){ans += C;}else{ ans += (C + 10-(C%10)); if (min>C%10){min = C%10;}}
if (D%10==0){ans += D;}else{ ans += (D + 10-(D%10)); if (min>D%10){min = D%10;}}
if (E%10==0){ans += E;}else{ ans += (E + 10-(E%10)); if (min>E%10){min = E%10;}}


printf("%d",ans-(10-min));

return 0;

}
//  [c]
#include<stdio.h>
int main()
{
    int a[5],max=0,i;
    for(i=0;i<5;i++)
    {
        scanf("%d",&a[i]);
    }
    int t;
    for(i=0;i<5;i++)
    {
        if(max<(10-(a[i]%10))&&a[i]%10!=0)
        {
            max=10-(a[i]%10);
            t=i;
        }
    }
    int sum=0;
    for(i=0;i<5;i++)
    {
        if(i!=t)
        {
            if(a[i]%10!=0)
            {
                sum=sum+a[i]+(10-a[i]%10);
            }
            else
            {
                sum=sum+a[i];
            }
        }
        else
        {
            sum+=a[i];
        }
    }
    printf("%d",sum);
}
//  [javascript]
'use strict';

function Main(input) {
  const A = input.split("\n")[0]
  const B = input.split("\n")[1]
  const C = input.split("\n")[2]
  const D = input.split("\n")[3]
  const E = input.split("\n")[4]

  const endA = A.substr(-1, 1)
  const endB = B.substr(-1, 1)
  const endC = C.substr(-1, 1)
  const endD = D.substr(-1, 1)
  const endE = E.substr(-1, 1)
  
  let endMin = 10
  if (endA < endMin && endA != 0) {
      endMin = endA
  }
  if (endB < endMin && endB != 0) {
      endMin = endB
  }
  if (endC < endMin && endC != 0) {
      endMin = endC
  }
  if (endD < endMin && endD != 0) {
      endMin = endD
  }
  if (endE < endMin && endE != 0) {
      endMin = endE
  }

  const roundA = Math.ceil(A / 10) * 10
  const roundB = Math.ceil(B / 10) * 10
  const roundC = Math.ceil(C / 10) * 10
  const roundD = Math.ceil(D / 10) * 10
  const roundE = Math.ceil(E / 10) * 10

  console.log(roundA + roundB + roundC + roundD + roundE - 10 + Number(endMin))
};

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const A = parseInt(arg[0].split(" ")[0]);
    const B = parseInt(arg[1].split(" ")[0]);
    const C = parseInt(arg[2].split(" ")[0]);
    const D = parseInt(arg[3].split(" ")[0]);
    const E = parseInt(arg[4].split(" ")[0]);
    
    const list = [A, B, C, D, E];
    let last = Infinity;
    let lastIdx = -1;
    
    for(let i=0; i<5; i++) {
        let temp = list[i] % 10;
        
        if(temp !== 0) {
            if(last > temp) {
                lastIdx = i;
                last = temp;
            }
        }
    }
    
    let answer = 0;
    
    for(let i=0; i<5; i++) {
        let temp = list[i] % 10;
        
        if(i === lastIdx) {
            answer += list[i];
        } else {
            if(temp !== 0) {
                answer += list[i] + (10 - temp);
            } else {
                answer += list[i];
            }
        }
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
'use strict'
let input = require("fs").readFileSync("/dev/stdin", "utf8");
input = input.split('\n').map(x=> x*1);
// 1桁目が0以外で1に近いほうをあとに注文したい（待たされるから）
let oneKetaMin =Math.min(...input.map(x=> x % 10).filter(x=> x!= 0));
// 原則は繰り上げて足し合わせる
let Sum = input.map(x => Math.ceil(x/10)*10).reduce((x,a)=> a+=x);
// 必要な数を最後に引く
// 全部の1桁目以外かどうかで分岐
if(isFinite(oneKetaMin)){
	Sum = Sum - 10 + oneKetaMin
}

console.log(Sum);
//  [go]
package main

import (
	"fmt"
)

func main() {
	a := make([]int, 5)
	for i := 0; i <5;i++{
		fmt.Scan(&a[i])
	}

	sum := 0
	max := 0
	for i := 0; i < 5; i++ {
		sum += a[i]
		if v := a[i] % 10; v != 0 {
			p := 10 - v
			if p > max {
				max = p
			}
			sum += p
		}
	}
	fmt.Println(sum-max)

}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

const (
	initialBufSize = 100000
	maxBufSize     = 1000000
)

var sc *bufio.Scanner

func initScanner(r io.Reader) *bufio.Scanner {
	buf := make([]byte, initialBufSize)

	sc := bufio.NewScanner(r)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords) // bufio.ScanLines
	return sc
}

func main() {
	sc = initScanner(os.Stdin)
	fmt.Println(resolve(parseProblem()))
}

func parseProblem() int {
	ts := nextIntSlice(sc, 5)
	min := math.MaxInt32
	for p := range permutations(5) {
		t := 0
		for _, i := range p {
			t = (t + 9) / 10 * 10
			t += ts[i]
		}
		if min > t {
			min = t
		}
	}
	return min
}

func permutations(l int) chan []int {
	ch := make(chan []int)
	go func() {
		dfsPermutations(0, make([]bool, l), []int{}, func(perm []int) bool {
			p := make([]int, len(perm))
			copy(p, perm)
			ch <- p
			return false
		})
		close(ch)
	}()
	return ch
}

func dfsPermutations(pos int, used []bool, perm []int, atLeaf func(perm []int) (halt bool)) (halt bool) {
	l := len(used)
	if pos == l {
		if atLeaf(perm) {
			return true
		}
	}

	for i := 0; i < l; i++ {
		if used[i] {
			continue
		}
		used[i] = true
		if dfsPermutations(pos+1, used, append(perm, i), atLeaf) {
			return true
		}
		used[i] = false
	}
	return false
}

func nextInt(sc *bufio.Scanner) int {
	sc.Scan()
	a, _ := strconv.Atoi(sc.Text())
	return int(a)
}

func nextString(sc *bufio.Scanner) string {
	sc.Scan()
	return sc.Text()
}

func nextIntSlice(sc *bufio.Scanner, n int) (a []int) {

	a = make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt(sc)
	}
	return a
}

func resolve(n int) int {
	return n
}

// snip-scan-funcs
func scanInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return int(i)
}
func scanString(sc *bufio.Scanner) string {
	sc.Scan()
	return sc.Text()
}
//  [ruby]
#!/usr/bin/env ruby

require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.chomp.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end

A = get_int
B = get_int
C = get_int
D = get_int
E = get_int

test = [A, B, C, D, E]
test = test.map { |x| [x, (x % 10 == 0) ? 10 : x % 10] }.sort { |a, b| a[1] <=> b[1] }.reverse

count = 0
test[0...-1].each do |x, _|
  count += (x / 10 + (x % 10 > 0 ? 1 : 0)) * 10
end

count += test.last[0]

puts count
//  [ruby]
abc = gets.to_i
arc = gets.to_i
agc = gets.to_i
apc = gets.to_i
atc = gets.to_i

abc_a = (abc*0.1).ceil*10
arc_a = (arc*0.1).ceil*10
agc_a = (agc*0.1).ceil*10
apc_a = (apc*0.1).ceil*10
atc_a = (atc*0.1).ceil*10

abc_b = abc_a - abc
arc_b = arc_a - arc
agc_b = agc_a - agc
apc_b = apc_a - apc
atc_b = atc_a - atc

array = [abc_b,arc_b,agc_b,apc_b,atc_b]

b = 0
array.each do |n|
  b = n if n >= b
end


puts abc_a + arc_a + agc_a + apc_a + atc_a - b
//  [ruby]
arr = Array.new(5)
5.times do |i|
	arr[i] = gets.chomp.to_i
end

min = 10
arr.each do |a|
	ngo = a.to_s[-1].to_i 
	min = ngo if min > ngo && ngo != 0
end

cnt = 0
arr.each do |a|
	cnt += (a / 10.0).ceil * 10
end
cnt -= (10 - min) if min != 10
puts cnt
//  [rust]
use proconio::{fastout, input};

#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;

#[fastout]
fn main() {
    input! {
        v: [usize; 5],
    }

    let mut ans = 0;
    for e in &v {
        ans += e;
        while ans % 10 != 0 {
            ans += 1;
        }
    }
    ans -= v.iter().map(|&e| (10 - (e % 10)) % 10).max().unwrap();
    println!("{}", ans);
}
//  [rust]
use whiteread::parse_line;

fn main() {
    let mut time: Vec<u32> = Vec::new();
    let mut ans: u32 = 0;
    for _ in 0..5 {
        time.push(parse_line().unwrap());
    }
    time.sort_by_key(|x| x % 10);
    for &t in &time {
        if t % 10 == 0 {
            ans += t;
        } else {
            ans += (t / 10 + 1) * 10;
        }
    }
    if let Some(idx) = time.iter().position(|&x| x % 10 != 0) {
        println!("{}", ans - (10 - time[idx] % 10));
    } else {
        println!("{}", ans);
    }
}
//  [rust]
#[allow(unused_imports)]
use std::{cmp::Reverse, collections::*};

#[allow(unused_imports)]
use proconio::{
    fastout, input,
    marker::{Chars, Usize1},
};

#[allow(unused_imports)]
use itertools::Itertools;

#[allow(unused_imports)]
use num::Integer;

#[fastout]
pub fn main() {
    input! {
        m: [i32; 5],
    }

    println!(
        "{}",
        (0..5)
            .permutations(5)
            .map(|indices| {
                let mut t = 0;
                for i in indices {
                    if t % 10 != 0 {
                        t += 10 - (t % 10);
                    }
                    t += m[i];
                }
                t
            })
            .min()
            .unwrap()
    );
}
//  [typescript]
import { COPYFILE_FICLONE_FORCE } from 'constants';

namespace Coder {
  class Scanner {
    private buffer: string = '';
    private stdinQueue: any = [];

    constructor() {
      process.stdin.resume();
      process.stdin.setEncoding('utf8');
      process.stdin.on(
        'data',
        (chunk): void => {
          this.buffer += chunk;
          while (this.stdinQueue.length > 0) {
            const i = this.buffer.indexOf('\n');
            if (i < 0) {
              break;
            }
            let line = this.buffer.substr(0, i);
            if (line.endsWith('\r')) {
              line = line.slice(0, -1);
            }
            this.buffer = this.buffer.substr(i + 1);
            this.stdinQueue.shift()(line);
          }
        },
      );
    }
    public getLine(): Promise<string> {
      return new Promise((resolve, reject) => {
        const i = this.buffer.indexOf('\n');
        if (i >= 0 && this.stdinQueue.length == 0) {
          let line = this.buffer.substr(0, i);
          if (line.endsWith('\r')) {
            line = line.slice(0, -1);
          }
          this.buffer = this.buffer.substr(i + 1);
          resolve(line);
        } else {
          this.stdinQueue.push(resolve);
        }
      });
    }

    public close(): void {
      process.stdin.pause();
    }
  }

  const checkFlag = (f: any) => {
    return f['A'] && f['B'] && f['C'];
  };

  async function slove() {
    const sc = new Scanner();
    const input = [];
    for (let i = 0; i < 5; i += 1) {
      input.push(+(await sc.getLine()));
    }
    let ans = 0;
    let max = 10000;
    const ary = [];
    for (let i = 0; i < 5; i += 1) {
      const val = input[i];
      if (val % 10 === 0) {
        ans += val;
      } else {
        const d = val % 10;
        max = Math.min(d, max);
        ary.push(val);
      }
    }
    let f = false;
    for (const v of ary) {
      if (!f && v % 10 === max) {
        ans += v;
        f = true;
      } else {
        ans += Math.ceil(v / 10) * 10;
      }
    }
    console.log(ans);
    sc.close();
  }

  slove();
}
//  [typescript]
const t={input:require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/),n:(arg:number=0):any=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.n())}return a}else{const a=t.input[0];t.input.shift();return Number(a)}},s:(arg:number=0):any=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.s())}return a}else{const a=t.input[0];t.input.shift();return String(a)}},c:(arg:number=0):any=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.c())}return a}else{let a=t.input[0].split('');const b=a[0];a.shift();if(a.length>0){t.input[0]=a.join('')}else{t.input.shift()}return String(b)}},o:(...arg)=>{console.log(...arg)},abs:(a)=>{return Math.abs(a)},min:(...a)=>{return Math.min(...a)},max:(...a)=>{return Math.max(...a)},floor:(a)=>{return Math.floor(a)},asc:(ar:number[])=>{return ar.sort((a,b)=>{return a-b})},desc:(ar:number[])=>{return ar.sort((a,b)=>{return b-a})},sw:(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1];}return arr[arr.length-1]}};
const main=()=>{
  let an=t.n(5)
  an = an.sort((a,b)=>{return (b%10==0?10:b%10)-(a%10==0?10:a%10)})
  let time=an[0]
  if(time%10==0)time+=an[1]
  else time+=10-(time%10)+an[1]
  if(time%10==0)time+=an[2]
  else time+=10-(time%10)+an[2]
  if(time%10==0)time+=an[3]
  else time+=10-(time%10)+an[3]
  if(time%10==0)time+=an[4]
  else time+=10-(time%10)+an[4]
  t.o(time)
}
main()
//  [typescript]
const dishes = require('fs').readFileSync('/dev/stdin', 'utf8').split(/\n/).map(i=>parseInt(i,10)).slice(0,5);

mins = dishes.map(i => i % 10).filter(i => i !== 0);
const minRest = mins.length ? Math.min(...mins) : 10;

console.log(dishes.map(i => Math.ceil(i / 10) * 10).reduce((a,c)=>a+c) - 10 + minRest);
//  [python]
a,b = map(int,input().split())
s = input()

if s[:a].isdecimal()==True and s[-b:].isdecimal()==True and s[a]=='-' and len(s[a+1:])==b:
    print("Yes")
else:
    print("No")
//  [python]
a,b=map(int,input().split())
s=input()
if 1<=a<=5 and 1<=b<=5:
    if s[a]=="-":
        if s[0:a].isdecimal() and s[a+1:a+b+1].isdecimal():
            print("Yes")
            exit()
print("No")
//  [python]
a,b=map(int,input().split())
w=input()
flag=0
if w.count('-')!=1:
    flag=1
if w.count('-')!=0:
    if w.index('-')!=a:
        flag=1
if flag:print('No')
else:print('Yes')
//  [python]
A, B = map(int, input().split())
S = input()
for i in range(A):
    if not S[i].isdecimal():
        print('No')
        exit()
if S[A] != '-':
        print('No')
        exit()
for i in range(A+1, A+B+1):
    if not S[i].isdecimal():
        print('No')
        exit()
print('Yes')
//  [python]
# encoding:utf-8

import copy
import numpy as np
import random

a,b = map(int, input().split())
s = str(input())

s = s.split("-")
if len(s[0]) == a and len(s[1]) == b:
    try:
        int(s[0]) and int(s[1])
        print("Yes")
    except:
        print("No")
        
else:
    print("No")
//  [python]
#print#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
from fractions import gcd
def resolve():
    A,B=pin()
    S=input()
    for i in range(A+B+1):
        if i==A:
            if S[i]!="-":
                print("No")
                return
        else:
            if S[i]=="-":
                print("No")
                return
    print("Yes")
        
#%%submit!    
resolve()
//  [java]
import java.util.*;
import java.io.*;

public class Main {
   
	public static void main(String[] args) throws IOException {
		InputReader in = new InputReader(System.in);
		int a = in.readInt(); 
		int b = in.readInt(); 
	    char s[] = in.readString().toCharArray(); 
	    for(int i = 0; i<a; i++) {
	    	if(!(s[i] >= '0' && s[i] <= '9')) {
	    		System.out.println("No"); 
	    		return; 
	    	}
	    }
	    for(int i = a+1; i<=a+b; i++) {
	    	if(!(s[i] >= '0' && s[i] <= '9')) {
	    		System.out.println("No"); 
	    		return ; 
	    	}
	    }
	    if(s[a] != '-') {
	    	System.out.println("No"); 
	    	return;
	    }
	    System.out.println("Yes"); 
	}
}
class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	public long readLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}
	
	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public String next() {
		return readString();
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

/*
 public class abc084b {

 }

 */
public class Main {
  public void solve() throws FileNotFoundException {
    InputStream inputStream = System.in;

    InputHelper in = new InputHelper(inputStream);

    // actual solution
    int a = in.readInteger();
    int b = in.readInteger();

    String s = in.read();

    if (s.charAt(a) != '-') {
      System.out.println("No");
      return;
    }

    for (int i = 0; i < a; i++) {
      if (!Character.isDigit(s.charAt(i))) {
        System.out.println("No");
        return;
      }
    }

    for (int i = a + 1; i < a + b + 1; i++) {
      if (!Character.isDigit(s.charAt(i))) {
        System.out.println("No");
        return;
      }
    }

    System.out.println("Yes");
    // end here
  }

  public static void main(String[] args) throws FileNotFoundException {
    (new Main()).solve();
  }

  class InputHelper {
    StringTokenizer tokenizer = null;
    private BufferedReader bufferedReader;

    public InputHelper(InputStream inputStream) {
      InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
      bufferedReader = new BufferedReader(inputStreamReader, 16384);
    }

    public String read() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          String line = bufferedReader.readLine();
          if (line == null) {
            return null;
          }
          tokenizer = new StringTokenizer(line);
        } catch (IOException e) {
          e.printStackTrace();
        }
      }

      return tokenizer.nextToken();
    }

    public Integer readInteger() {
      return Integer.parseInt(read());
    }

    public Long readLong() {
      return Long.parseLong(read());
    }
  }
}
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.stream.Stream;
public class Main {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			int[] AB = Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && AB[0] - AB[1] == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	}
}
//  [java]
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();

        System.out.println(solve(A, B, S) ? "Yes" : "No");

        sc.close();
    }

    static boolean solve(int A, int B, String S) {
        return IntStream.range(0, S.length())
                .allMatch(i -> (i == A) ? (S.charAt(i) == '-') : Character.isDigit(S.charAt(i)));
    }
}
//  [java]
import java.util.*;

public class Main {
    Scanner in = new Scanner(System.in);

    public void run() {
        int a = in.nextInt(), b = in.nextInt();
        String s = in.next();

        boolean ok = true;
        for (int i = 0; i <= a + b; i++) {
            if (i == a) {
                ok &= s.charAt(i) == '-';
            } else {
                ok &= Character.isDigit(s.charAt(i));
            }
        }
        System.out.println(ok ? "Yes" : "No");
    }


    public static void main(String[] args) {
        new Main().run();
    }
}
//  [cpp]

#include <cstdio>
#include <cctype>
#include <cstdlib>

using namespace std;

char s[25];
int a, b;

void err() {
    puts("No");
    exit(0);
}

int main(int argc, char* argv[]) {
    scanf("%d%d", &a, &b);
    scanf("%s", s);

    for (int i = 0; i < a; ++i) {
        if (!isdigit(s[i]))
            err();
    }
    if (s[a] != '-')
        err();
    for (int i = a + 1; i < a + b + 1; ++i) {
        if (!isdigit(s[i]))
            err();
    }

    puts("Yes");
    return 0;
}
//  [cpp]
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<algorithm>
#include<queue>
#include<vector>
#include<map>
#define ll long long
#define min(a,b) (a<b?a:b)
#define max(a,b) (a>b?a:b)
ll read()
{
	ll tmp=0; char f=1,c=getchar();
	while(c<'0'||'9'<c){if(c=='-')f=-1; c=getchar();}
	while('0'<=c&&c<='9'){tmp=tmp*10+c-'0'; c=getchar();}
	return tmp*f;
}
using namespace std;
char s[1010];
int main()
{
	ll a=read(),b=read(),i;
	scanf("%s",s);
	int flag=1;
	for(i=0;i<a;i++)if(s[i]<'0'||'9'<s[i])flag=0;
	if(s[a]!='-')flag=0;
	for(i=a+1;i<=a+b;i++)if(s[i]<'0'||'9'<s[i])flag=0;
	if(flag)printf("Yes\n");else printf("No\n");
	return 0;
}
//  [cpp]
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
	int A, B;
	char S[15];
	while(scanf("%d%d%s",&A,&B,S)!=EOF){
		if(strlen(S)<A+B+1){
			printf("No\n");
			continue;
		}
		
		
		int flag = 1;
		for(int i = 0; i < A; i++){
			if(!('0'<=S[i] && S[i]<='9')){
				flag = 0;
				break;
			}
		}
		
		if(flag){
			for(int i = A+1; i < A+B; i++){
				if(!('0'<=S[i] && S[i]<='9')){
					flag = 0;
					break;
				}
			}
		}
		
		if(flag && S[A] != '-') flag = 0;
		if(flag) printf("Yes\n");
		else printf("No\n");
	}
	return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  string s;
  cin>>s;
  if(s.size()!=a+b+1){
    cout<<"No"<<endl;
    return(0);
  }
  for(int i=0;i<a;i++){
    if('0'>s[i]||s[i]>'9'){
      cout<<"No"<<endl;
      return(0);
    }
  }
  if(s[a]!='-'){
    cout<<"No"<<endl;
    return(0);
  }
  for(int i=a+1;i<=a+b;i++){
      if('0'>s[i]||s[i]>'9'){
        cout<<"No"<<endl;
        return(0);
      }
  }
  cout<<"Yes"<<endl;
  return(0);
}
//  [cpp]
#include <bits/stdc++.h>  // g++ -std=c++14 -o a a.cpp

using namespace std;

typedef pair<int, int> P;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define repto(i, n) for(int i = 0; i <= (n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end()) // ちゃんとユニークな配列にする。連続した値を除去して切り出す。
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007
#define DEBUG(x) cout << #x << ": " << x << endl;

int main() {
  int A, B;
  string S;
  cin >> A >> B >> S;
  int lengthOfStr = 0;
  lengthOfStr = A + B + 1;
  bool isPostalCode = true;

  if (S.length() != lengthOfStr) isPostalCode = false;
  if (isPostalCode) {
    rep(i, lengthOfStr) {
      if(i == A) {
        if(S[i] != '-') isPostalCode = false;
      } else {
        if(!isdigit(S[i])) isPostalCode = false;
      }
    }
  }

  if(isPostalCode) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void){
char s[105];
int a,b;
scanf("%d %d",&a,&b);
scanf("%s",s);
for(int i=0;s[i]!='\0';i++){
    if(i==a){
        if(s[i]!='-'){printf("No\n");return 0;}
    }
    else if(s[i]=='-'){printf("No\n");return 0;}
}
printf("Yes\n");
}
//  [c]
#include<stdio.h>

int main(void)
{
    int a, b;
    char s[10];

    scanf("%d%d%s", &a, &b, s);

    if ('-' == s[a]) {
        s[a] = '0';
    }
    else {
        printf("No\n");
        return 0;
    }

    for (int i=0; (a+b) > i; i++) {
        if ('0' > s[i] || '9' < s[i]) {
            printf("No\n");
            return 0;
        }
    }
    
    printf("Yes\n");
    return 0;
}
//  [c]
/*

結果:
*/
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>  
#include <stdbool.h>   
#define inf (INT_MAX-1)
#define INF 9223372036854775807
#define PI 3.14159265358979323846;
#define EPS 1e-10
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
/*
#define sort(a,n) qsort(a,n,sizeof(TYPE),cmp)
#define sort_r(a,n) qsort(a,n,sizeof(TYPE),cmp_r)
*/
#define chsort(s,n) qsort(s,n,sizeof(char),cmp)
#define chsort_r(s,n) qsort(s,n,sizeof(char),char_cmp_r)
#define TYPE long long
#define ll long long
#define MEMSET(a) memset(a,0,sizeof(a))
#define MEMSET_U(a) memset(a,-1,sizeof(a))
const int mod = (int)1e09 + 7;

//#define DEBUG1
//#define DEBUG2
//#define DEBUGF
#define DUMMY

int in(void) { int i; scanf("%d", &i); return i; }
long long llin(void) { long long i; scanf("%lld", &i); return i; }
double din(void) { double i; scanf("%lf", &i); return i; }
void chin(char s[]) { scanf("%s", s); }

void print(int a) { printf("%d\n", a); }
void llprint(long long a) { printf("%lld\n", a); }
void dprint(double a) { printf("%.10f\n", a); }
void print2(int a, int b) { printf("%d %d\n", a, b); }
int Max(int a, int b) { if (a > b) { return a; }return b; }
int Min(int a, int b) { if (a < b) { return a; }return b; }
long long llmax(long long a, long long b) { return a > b ? a : b; }
long long llmin(long long a, long long b) { return a < b ? a : b; }
double dmax(double a, double b) { return a > b ? a : b; }
double dmin(double a, double b) { return a < b ? a : b; }
//long long llmax(long long a, long long b) { return a > b ? a : b; }
//long long llmin(long long a, long long b) { return a < b ? a : b; }
//double dmax(double a, double b) { return a > b ? a : b; }
int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; }
int cmp_r(const void *a, const void *b) { return *(TYPE *)b - *(TYPE *)a; }
int char_cmp(const void *a, const void *b) { return strcmp((char *)a, (char *)b); }
int char_cmp_r(const void *a, const void *b) { return strcmp((char *)b, (char *)a); }
void swap(int *a, int *b) { int t = *a; *a = *b; *b = t; }




int main() {
	int A, B;
	char S[12];
	int ngflg = 0;
	scanf("%d%d", &A, &B);
	scanf("%s", &S);
	//printf("%s", S);

	if (strlen(S) != A + B + 1) {
		ngflg = 1;
	}
	if (ngflg == 0) {
		for (int i = 0; i < strlen(S); i++) {
			if (i != A && S[i] == '-') {
				ngflg = 1;
			}
			if (i == A && S[i] != '-') {
				ngflg = 1;
			}
		}
	}
	if (ngflg == 0) {
		puts("Yes");
	}
	else {
		puts("No");
	}

#ifdef DEBUGF
	getch();
#endif
	return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef long long ll;
typedef int keytype;

int gcd(int a, int b){ return (a % b) ? gcd(b, a % b) : b;}
int lcm(int a, int b){ return (a / gcd(a, b)) * b;}

void quicksort(keytype a[], int first, int last)
{
    int i, j;
    keytype x, t;

    x = a[(first + last) / 2];
    i = first;  j = last;
    for ( ; ; ) {
        while (a[i] < x) i++;
        while (x < a[j]) j--;
        if (i >= j) break;
        t = a[i];  a[i] = a[j];  a[j] = t;
        i++;  j--;
    }
    if (first  < i - 1) quicksort(a, first , i - 1);
    if (j + 1 < last) quicksort(a, j + 1, last);
}

int is_prime(int x){
    if(x <= 1) return 0;
    for(int i = 2; i * i <= x; i++){
        if(x % i == 0) return 0;
    }
    return 1;
}

int is_substr(char s[], char t[], int i){
    int flag = 1;

    if(s[i] == '\0') flag = 0;

    for(int j = 0; j < strlen(t); ++j, ++i){
        if(s[i] != t[j]){
            flag = 0;
            break;
        }
    }
    return flag;
}

// factor list, number of factors, natural number
void factorize(int ftr[], int *num, int n){
    int a = 2, cnt = 0;

    while(n >= a){
        if(n % a == 0){
            n = n / a;
            ftr[cnt++] = a;
        }else{
            a++;
        }
    }
    *num = cnt;
}

void comb(int size1, int size2, int v[size1][size2]){
  for(int i = 0; i < size1; i++){
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for(int k = 1; k < size1; k++){
    for(int j = 1; j < k; j++){
      v[k][j] = (v[k-1][j-1] + v[k-1][j]);
    }
  }
}

int abs_val(int a, int b){
    if(a > b) return a - b;
    else return b - a;
}

int main(){
    int a, b;
    char s[12];

    scanf("%d %d %s", &a, &b, s);

    int i;
    for(i = 0; i < a; ++i){
        if(s[i] < '0' || s[i] > '9'){
            puts("No");
            return 0;
        }
    }
    if(s[i++] != '-'){
        puts("No");
        return 0;
    }
    for(; i < (a + b + 1); ++i){
        if(s[i] < '0' || s[i] > '9'){
            puts("No");
            return 0;
        }
    }
    puts("Yes");

    return 0;
}
//  [c]
#include <stdio.h>

int main (){
	int a,b;
	scanf ("%d %d", &a, &b);
	char str[20];
	scanf("%s", str);
	int valid = !0; 
	if (str[a]!='-')
	{
		valid = 0;
	}
	for (int i=0 ; str[i]!='\0' ; i++)
	{
		if (i!=a)
		{
			if(str[i]<'0' || str[i]>'9')
			{
				valid = 0;
				break; // keluar dari loop
			}
		}
	}
	(valid) ? printf("Yes") : printf ("No");	
return 0;
}
//  [c]
#include<stdio.h>

int main(){

int A,B,ans=1;
scanf("%d%d",&A,&B);
char S[A+B+2];

for (int i = 0; i < A+B+2; i++){
    scanf("%c",&S[i]);
}

for (int i = 1; i < A+B+2; i++){
    if ((i<A) && !(S[i]>= 48 && S[i]<= 57)){ ans = 0;break;}
    if (i==A+1 && !(S[A+1]=='-')){ ans = 0; break;}
    if (A+1<i && !(S[i]>= 48 && S[i]<= 57)){  ans = 0; break;}
}
ans > 0 ? puts("Yes") : puts("No");

return 0;

}
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
    var a = input[0].split(" ")[0]-0;
    var b = input[0].split(" ")[1]-0;
    var s = input[1];
    var rx = new RegExp("^\\d{" + a + "}-\\d{" + b + "}$");
    
    console.log(rx.test(s)?"Yes":"No");
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n"));
//  [javascript]
'use strict';

function main(input) {
  let AB = input.split("\n")[0].split(' ').map(x => Number(x));
  let s = input.split("\n")[1];

  if(s.length != AB[0] + AB[1] + 1 || s[AB[0]] != "-") {
  	console.log("No");
    return;
  }
  if(s.slice(0,AB[0]).match(/^[0-9]+$/) &&
	     s.slice(AB[0]+1).match(/^[0-9]+$/)){
    console.log("Yes");
    return;
  }
  console.log("No");

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
"use strict";
    
const main = arg => {
    const A = arg.split("\n")[0].split(" ")[0];
    const B = arg.split("\n")[0].split(" ")[1];
    const S = arg.split("\n")[1];
    
    if(S.split("-")[0].length == A && S.split("")[A] == "-" && S.split("-")[1].length == B) {
        console.log("Yes");
    } else {
        console.log("No");
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	input = input.split("\n");
	AB = input[0].split(" ");

	var A = AB[0],
		B = AB[1],
		S = input[1];

	console.log(new RegExp('^\\d{' + A + '}-\\d{' + B + '}$').test(S) ? 'Yes' : 'No');
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
((input) => {
    const lines = input.split("\n");

    const A = lines[0].split(" ").map(x => x | 0)[0];
    const cond = lines[1].split("").find((e, idx) => idx === A ? e !== "-": e === "-") === undefined;

    console.log(cond ? "Yes" : "No");
})(require("fs").readFileSync("/dev/stdin", "utf8"));
//})(``);
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
  
    var inp = input.split('\n');
    var buf = inp[0].split(' ');
    var A = parseInt(buf[0]);
    var B = parseInt(buf[1]);

    var inp2 = inp[1].split('-');
    
    if (inp2.length !== 2) {
      console.log('%s', 'No')
      return;
    };
    if (inp2[0].length !== A ) {
      console.log('%s', 'No');
      return;
    }
    if (inp2[1].length !== B ) {
      console.log('%s', 'No');
      return;
    }
    if (isNaN(parseInt(inp2[0]))) {
      console.log('%s', 'No');
      return;
    }
    if (isNaN(parseInt(inp2[1]))) {
      console.log('%s', 'No')
      return;
    };
    
    console.log('%s', 'Yes');


  }
  //*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
        "fmt"
)

func solution(a, b int, s string) string {
        if s[a] != '-' {
                return "No"
        }
        for i := 0; i < a+b+1; i++ {
                if i == a {
                        continue
                }
                n := s[i] - '0'
                if 0 > n || n > 9 {
                        return "No"
                }
        }
        return "Yes"
}

func main() {
        var a, b int
        var s string
        fmt.Scan(&a, &b, &s)
        fmt.Println(solution(a, b, s))
}
//  [go]
package main

import (
	"fmt"
	"unicode"
)

func main() {
	var a, b int
	fmt.Scanf("%d %d", &a, &b)

	var s string
	fmt.Scanf("%s", &s)

	flag := true
	i := 0
	for ; i < a; i++ {
		if unicode.IsDigit(rune(s[i])) == false {
			flag = false
			break
		}
	}
	if s[i] != '-' {
		flag = false
	}
	i += 1
	for ; i < a + b + 1; i++ {
		if unicode.IsDigit(rune(s[i])) == false {
			flag = false
			break
		}
	}

	if flag {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

const mod = 1000000007

// 1MB
const ioBufferSize = 1 * 1024 * 1024

var sc = func() *bufio.Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Buffer(make([]byte, ioBufferSize), ioBufferSize)
	sc.Split(bufio.ScanWords)
	return sc
}()

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func main() {
	a, b := nextInt(), nextInt()
	s := next()

	for i := 0; i < a+b+1; i++ {
		c := s[i]

		if i == a {
			if c != '-' {
				fmt.Println("No")
				return
			}
		} else {
			x, err := strconv.Atoi(string(c))
			if err != nil {
				fmt.Println("No")
				return
			}
			if x < 0 || x > 9 {
				fmt.Println("No")
				return
			}
		}
	}

	fmt.Println("Yes")
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
	"regexp"
)

type Io struct {
	reader    *bufio.Reader
	writer    *bufio.Writer
	tokens    []string
	nextToken int
}

func NewIo() *Io {
	return &Io{
		reader: bufio.NewReader(os.Stdin),
		writer: bufio.NewWriter(os.Stdout),
	}
}

func (io *Io) NextLine() string {
	var buffer []byte
	for {
		line, isPrefix, err := io.reader.ReadLine()
		if err != nil {
			panic(err)
		}
		buffer = append(buffer, line...)
		if !isPrefix {
			break
		}
	}
	return string(buffer)
}

func (io *Io) Next() string {
	for io.nextToken >= len(io.tokens) {
		line := io.NextLine()
		io.tokens = strings.Fields(line)
		io.nextToken = 0
	}
	r := io.tokens[io.nextToken]
	io.nextToken++
	return r
}

func (io *Io) NextInt() int {
	i, err := strconv.Atoi(io.Next())
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) NextFloat() float64 {
	i, err := strconv.ParseFloat(io.Next(), 64)
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) PrintLn(a ...interface{}) {
	fmt.Fprintln(io.writer, a...)
}

func (io *Io) Printf(format string, a ...interface{}) {
	fmt.Fprintf(io.writer, format, a...)
}
func (io *Io) PrintIntLn(a []int) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.PrintLn(b...)
}

func (io *Io) PrintStringLn(a []string) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.PrintLn(b...)
}

// ax+by=gcd(a,b)
func extgcd(a, b int) (x, y int) {
	y = 1
	x = 0
	for u, v := 1, 0; a != 0; {
		q := b / a
		u, x = x - q * u, u
		v, y = y - q * v, v
		a, b = b - q * a, a
	}

	return
}

func modinv(a, m int) int {
	x, _ := extgcd(a, m)
	return (m + x % m) % m
}

func fact(n, mod int) int {
	ret := 1
	for n > 1 {
		ret = ret * n % mod
		n--
	}
	return ret
}

type P struct {
	w,p int
}

func main() {
	io := NewIo()
	defer io.writer.Flush()

	//n := io.NextInt()
	//k := io.NextInt()
	//
	//vp := make([]P, n, n)
	//for i := 0; i < n; i++ {
	//	vp[i].w = io.NextInt()
	//	vp[i].p = io.NextInt()
	//}
	n := io.NextInt()
	m := io.NextInt()
	r := regexp.MustCompile(fmt.Sprintf(`[0-9]{%d}-[0-9]{%d}`, n, m))
	s := io.Next()
	if r.MatchString(s) {
		io.Printf("Yes\n")
	} else {
		io.Printf("No\n")
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"unicode"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	scanInit()

	a := nextInt()
	_ = nextInt()
	s := nextStr()

	ok := true

	for i := 0; i < len(s); i++ {
		if i == a {
			if s[i] != '-' {
				ok = false
				break
			}
		} else {
			//if (s[i] < '0') || (s[i] > '9') {
			if !isDigit(s[i]) {
				ok = false
				break
			}
		}

	}

	if ok == true {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}

}

func isDigit(a byte) bool {
	return ((a >= '0') && (a <= '9'))
}
func isDigit2(a byte) bool {
	return unicode.IsDigit(rune(a))
}

// ---- readfunc
func scanInit() {
	const cap = 64 * 1024
	var buf = make([]byte, cap)
	sc.Buffer(buf, cap)
	sc.Split(bufio.ScanWords)
	return
}
func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func nextStr() string {
	sc.Scan()
	return sc.Text()
}
//  [ruby]
a, b = gets.split.map &:to_i
s = gets.chomp
puts s.match(/\d{#{a}}-\d{#{b}}/) ? :Yes: :No
//  [ruby]
a,b = gets.split.map(&:to_i)
S = gets.chomp.split('-')
if S.length == 2 then
    puts S[0].length == a && S[1].length == b ? "Yes" : "No"
else
    puts "No"
end
//  [ruby]
A,B=gets.split.map(&:to_i)
S=gets.chomp

puts (S.match(/\d{#{A}}-\d{#{B}}/) ? 'Yes' : 'No')
//  [ruby]
A,B=gets.chomp.split(' ').map{|n| n.to_i}
S,dum=gets.chomp.split(' ').map{|n| n}

if(S =~ /[0-9]{#{A}}-[0-9]{#{B}}/)
	puts "Yes"
else
	puts "No"
end
//  [ruby]
as,bs = gets.strip.split.map(&:to_i)
s = gets.strip.split("").to_a
if s[as]=="-" && s.count("-")==1
  puts "Yes"
else
  puts "No"
end
//  [ruby]
a,b=gets.split.map(&:to_i)
s=gets.chomp

if s.match(/\A\d{#{a}}[-]\d{#{b}}\z/)
    puts "Yes"
else
    puts "No"
end
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        a: usize,
        b: usize,
        s: chars
    }
    let mut valid = true;
    for i in 0..a+b+1 {
        if i == a {
            if s[i] != '-' {
                valid = false
            }
        } else {
            if s[i] == '-' {
                valid = false
            }
        }
    }
    println!("{}", 
        if valid {"Yes"} else {"No"}
    );
}
//  [rust]
use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;
#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()

}

#[allow(dead_code)]
fn read_as_string() -> String{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

fn main(){
    let line = read_as_vec::<usize>();
    let (a, b) = (line[0], line[1]);
    let mut s = read_as_string().chars().collect::<Vec<char>>();
    if s[a] != '-'{
        println!("No");
        return;
    }
    s.remove(a);

    if s.into_iter().all(|c| c.is_numeric()){
        println!("Yes");
    }else{
        println!("No");
    }
}
//  [rust]
#![allow(non_snake_case)]
#![allow(unused_imports)]
use proconio::input;
use std::cmp::max;
use std::cmp::min;
use std::collections::HashMap;
use std::collections::VecDeque;

fn main() {
    input! {
        A: usize,
        B: usize,
        S: String,
    }

    let mut is_ok = true;
    for i in 0..A {
        if &S[i..=i] == "-" {
            is_ok = false;
        }
    }

    if &S[A..=A] != "-" {
        is_ok = false;
    }

    for i in A + 1..A + B + 1 {
        if &S[i..=i] == "-" {
            is_ok = false;
        }
    }

    let ans = if is_ok { "Yes" } else { "No" };
    println!("{}", ans);
}
//  [rust]
use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("Failed to read bytes") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let a:usize = read();
    let b:usize = read();
    let s:Vec<char> = read::<String>().chars().collect();
    let num = s.iter().filter(|&&x| x.is_numeric()).count();
    if s[a] == '-' && num == a + b {
        println!("Yes");
    } else {
        println!("No");
    }
}
//  [rust]
use proconio::{input, fastout};
use proconio::marker::{Chars};
use proconio::marker::Usize1;
use std::cmp::*;

macro_rules! debug {
      ($($a:expr),*) => {
          eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

#[fastout]
fn main() {
    input!{
        a: usize,
        b: usize,
        s: Chars,
    }

    let mut cnt = 0;
    for i in s {
        debug!(cnt);
        debug!(i);
        if (i.is_digit(10) && cnt!=a) || (i=='-' && cnt==a) {
            cnt += 1;
        } else {
            println!("No");
            return;
        }
    }

    if cnt==a+b+1 {
        println!("Yes");
    } else {
        println!("No");
    }

}
//  [swift]
import Foundation
func toTuple<T>(_ args: [T]) -> (T, T) { (args[0], args[1]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }

let (a, b) = toTuple(readInts())
let s = readLine()!.split(separator: "-")
guard s.count == 2 else { print("No"); exit(0) }
if s[0].count == a , s[1].count == b{
  print("Yes")
} else {
  print("No")
}
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/

//var min, min2, count: Int!
//for i in 1...10 {
//    let x = Int(readLine()!)!
//    if i == 1 {
//        min = x
//        count = 1
//    } else if x < min {
//        min2 = min
//        min = x
//        count = 1
//    } else if x == min && count == 1 {
//        min2 = x
//        count = 2
//    }
//}
//print(min2)

/*************** メインプログラム ***************/

let input = readIntSplit(by: " ")
let (A, B) = (input[0], input[1])
let S = readLine()!.toArray()
var ans = "Yes"
for (i, c) in S.enumerate() {
    if i == A {
        if c != "-" {
            ans = "No"
            break
        }
    } else {
        if c == "-" {
            ans = "No"
            break
        }
    }
}
print(ans)