output_description: If A and C can communicate, print `Yes`; if they cannot, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a b c d
attempt: s = input()
  K = int(input())
  
  f1 = ""
  f2 = ""
  f3 = ""
  f4 = ""
  f5 = ""
  for a1 in range(0, len(s)):
      for a2 in range(a1 + 1, len(s) + 1):
          w = s[a1:a2]
          if w != f1 and w != f2 and w != f3 and w != f4 and w != f5:
              if f5 == "" or w < f5:
                  f5 = w
              if f4 == "" or f5 < f4:
                  t = f4
                  f4 = f5
                  f5 = t
              if f3 == "" or f4 < f3:
                  t = f3
                  f3 = f4
                  f4 = t
              if f2 == "" or f3 < f2:
                  t = f2
                  f2 = f3
                  f3 = t
              if f1 == "" or f2 < f1:
                  t = f1
                  f1 = f2
                  f2 = t
  
  if K == 1:
      print(f1)
  if K == 2:
      print(f2)
  if K == 3:
      print(f3)
  if K == 4:
      print(f4)
  if K == 5:
      print(f5)
  
problem_description: Statement
  
  Three people, A, B and C, are trying to communicate using transceivers. They
  are standing along a number line, and the coordinates of A, B and C are a, b
  and c (in meters), respectively. Two people can directly communicate when the
  distance between them is at most d meters. Determine if A and C can
  communicate, either directly or indirectly. Here, A and C can indirectly
  communicate when A and B can directly communicate and also B and C can
  directly communicate.
samples: [{"input": "4 7 9 3", "output": "Yes\n    \n\nA and B can directly communicate, and also B and C can directly communicate,\nso we should print `Yes`.\n\n* * *"}, {"input": "100 10 1 2", "output": "No\n    \n\nThey cannot communicate in this case.\n\n* * *"}, {"input": "10 10 10 1", "output": "Yes\n    \n\nThere can be multiple people at the same position.\n\n* * *"}, {"input": "1 100 2 10", "output": "Yes"}]