We call a 4-digit integer with three or more consecutive same digits, such as 1118, **good**.  You are given a 4-digit integer N. Answer the question: Is N **good**?
s = input()
a = int(s[0])
b = int(s[1])
c = int(s[2])
d = int(s[3])
 
k = [
[1, 1, 1],
[1, 1, -1],
[1, -1, 1],
[1, -1, -1],
[-1, 1, 1],
[-1, 1, -1],
[-1, -1, 1],
[-1, -1, -1]]
 
p = ""
 
for i in k:
  if (a + b * i[0] + c * i[1] + d * i[2]) == 7:
    p += str(a)
    p += "+" if i[0] == 1 else "-"
    p += str(b)
    p += "+" if i[1] == 1 else "-"
    p += str(c)
    p += "+" if i[2] == 1 else "-"
    p += str(d)
    p += "=7"
    print(p)
    break
s = input()
if s[1] == s[2] and s[2] == s[3]:
  print("Yes")
else:
  if s[0] == s[1] and s[1] == s[2]:
    print("Yes")
  else:
    print("No")
  