output_description: If the length of S is 2, print S as is; if the length is 3, print S after
  reversing it.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: N = int(input())
  k = 1
  n = 0
  while n < N:
      n += k
      k += 1
  if n != N:
      print("No")
      exit()
  print("Yes")
  print(k)
  ans = [[] for _ in range(k)]
  v = 1
  for i in range(k - 1):
      for j in range(i + 1, k):
          ans[i].append(v)
          ans[j].append(v)
          v += 1
  for row in ans:
      print(len(row), *row)
  
problem_description: Statement
  
  You are given a string S of length 2 or 3 consisting of lowercase English
  letters. If the length of the string is 2, print it as is; if the length is 3,
  print the string after reversing it.
samples: [{"input": "abc", "output": "cba\n    \n\nAs the length of S is 3, we print it after reversing it.\n\n* * *"}, {"input": "ac", "output": "ac\n    \n\nAs the length of S is 2, we print it as is."}]