output_description: If S consists of exactly two kinds of characters which both appear twice in S,
  print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: N, K = map(int, input().split(" "))
  red = N - K
  p = 10**9 + 7
  
  
  def comb(n, k, p):
      """power_funcを用いて(nCk) mod p を求める"""
      from math import factorial
  
      if n < 0 or k < 0 or n < k:
          return 0
      if n == 0 or k == 0:
          return 1
      a = factorial(n) % p
      b = factorial(k) % p
      c = factorial(n - k) % p
      return (a * power_func(b, p - 2, p) * power_func(c, p - 2, p)) % p
  
  
  def power_func(a, b, p):
      """a^b mod p を求める"""
      if b == 0:
          return 1
      if b % 2 == 0:
          d = power_func(a, b // 2, p)
          return d * d % p
      if b % 2 == 1:
          return (a * power_func(a, b - 1, p)) % p
  
  
  def factorial(n):
      if n == 0:
          return 1
      else:
          return n * factorial(n - 1)
  
  
  for i in range(1, K + 1):
      print(comb(red + 1, i, p) * comb(K - 1, i - 1, p) % p)
  
problem_description: Statement
  
  You are given a 4-character string S consisting of uppercase English letters.
  Determine if S consists of exactly two kinds of characters which both appear
  twice in S.
samples: [{"input": "ASSA", "output": "Yes\n    \n\nS consists of `A` and `S` which both appear twice in S.\n\n* * *"}, {"input": "STOP", "output": "No\n    \n\n* * *"}, {"input": "FFEE", "output": "Yes\n    \n\n* * *"}, {"input": "FREE", "output": "No"}]