output_description: For each query, print the pari of the lower bound $l$ ($l = 0, 1, ..., n$) and
  upper bound $r$ ($r = 0, 1, ..., n$) separated by a space character in a line.
input_description: The input is given in the following format.
  
      
      
      $n$
      $a_0 \; a_1 \; ,..., \; a_{n-1}$
      $q$
      $k_1$
      $k_2$
      :
      $k_q$
      
  
  The number of elements $n$ and each element $a_i$ are given in the first line
  and the second line respectively. In the third line, the number of queries $q$
  is given and the following $q$ lines, $q$ integers $k_i$ are given as queries.
attempt: # -*- coding: utf-8 -*-
  """
  Binary Search - Equal Range
  http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP2_6_D&lang=jp
  
  """
  from bisect import bisect_left, bisect_right
  
  n = int(input())
  A = [int(a) for a in input().split()]
  for _ in range(int(input())):
      k = int(input())
      print(bisect_left(A, k), bisect_right(A, k))
  
problem_description: Equal Range
  
  For a given sequence $A = \\{a_0, a_1, ..., a_{n-1}\\}$ which is sorted by
  ascending order, print a pair of the lower bound and the upper bound for a
  specific value $k$ given as a query.
  
    * lower bound: the place pointing to the first element greater than or equal to a specific value, or $n$ if there is no such element. 
    * upper bound: the place pointing to the first element greater than a specific value, or $n$ if there is no such element.
samples: [{"input": "4\n    1 2 2 4\n    3\n    2\n    3\n    5", "output": "1 3\n    3 3\n    4 4"}]