
def main():

    A,B = map(int,input().split())
    S = input()
    hihun = S[A]
    other = S[:A]+S[B:]

    print('Yes') if hihun == '-' and '-' not in other else print('No')









    
if __name__== "__main__":
    main() 









