output_description: If S is coffee-like, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: # -*- coding: utf-8 -*-
  import sys
  from collections import defaultdict
  
  
  MAX_INT = 2**62 - 1
  sys.setrecursionlimit(10**6)
  
  input = sys.stdin.readline
  
  
  N = 2 * (10**5) + 1
  MOD = 10**9 + 7
  
  fact = [1] * N
  fact_inv = [0] * N
  
  for i in range(1, 2 * (10**5) + 1):
      fact[i] = fact[i - 1] * i % MOD
      fact_inv[i] = pow(fact[i], MOD - 2, MOD)
  
  
  def solve(g):
      def dfs(pre, cur):
          if pre in memo and cur in memo[pre]:
              return memo[pre][cur]
  
          num, ways = 1, 1
  
          for nxt in g[cur]:
              if nxt == pre:
                  continue
              n, w = dfs(cur, nxt)
              num += n
              ways = ways * w % m * fi[n] % m
  
          ways = ways * f[num - 1] % m
          memo[pre][cur] = num, ways
          return num, ways
  
      m = MOD
      memo = defaultdict(dict)
      f, fi = fact, fact_inv
  
      for i in range(1, len(g)):
          print(dfs(None, i)[1])
  
  
  def main():
      n = int(input())
      g = [[] for _ in range(n + 1)]
  
      for _ in range(n - 1):
          a, b = map(int, input().split())
          g[a].append(b)
          g[b].append(a)
  
      solve(g)
  
  
  if __name__ == "__main__":
  
      main()
  
problem_description: Statement
  
  A string of length 6 consisting of lowercase English letters is said to be
  coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th
  and 6-th characters are also equal.  
  Given a string S, determine whether it is coffee-like.
samples: [{"input": "sippuu", "output": "Yes\n    \n\nIn `sippuu`, the 3-rd and 4-th characters are equal, and the 5-th and 6-th\ncharacters are also equal.\n\n* * *"}, {"input": "iphone", "output": "No\n    \n\n* * *"}, {"input": "coffee", "output": "Yes"}]