description: Polycarp must pay exactly n burles at the checkout. He has coins of two nominal values: 1 burle and 2 burles. Polycarp likes both kinds of coins equally. So he doesn't want to pay with more coins of one type than with the other.
  
  Thus, Polycarp wants to minimize the difference between the count of coins of 1 burle and 2 burles being used. Help him by determining two non-negative integer values c_1 and c_2 which are the number of coins of 1 burle and 2 burles, respectively, so that the total value of that number of coins is exactly n (i. e. c_1 + 2 ⋅ c_2 = n), and the absolute value of the difference between c_1 and c_2 is as little as possible (i. e. you must minimize |c_1-c_2|).
  
  Input
  
  The first line contains one integer t (1 ≤ t ≤ 10^4) — the number of test cases. Then t test cases follow.
  
  Each test case consists of one line. This line contains one integer n (1 ≤ n ≤ 10^9) — the number of burles to be paid by Polycarp.
  
  Output
  
  For each test case, output a separate line containing two integers c_1 and c_2 (c_1, c_2 ≥ 0) separated by a space where c_1 is the number of coins of 1 burle and c_2 is the number of coins of 2 burles. If there are multiple optimal solutions, print any one.
  
  Example
  
  Input
  
  
  6
  1000
  30
  1
  32
  1000000000
  5
  
  
  Output
  
  
  334 333
  10 10
  1 0
  10 11
  333333334 333333333
  1 2
  
  Note
  
  The answer for the first test case is "334 333". The sum of the nominal values of all coins is 334 ⋅ 1 + 333 ⋅ 2 = 1000, whereas |334 - 333| = 1. One can't get the better value because if |c_1 - c_2| = 0, then c_1 = c_2 and c_1 ⋅ 1 + c_1 ⋅ 2 = 1000, but then the value of c_1 isn't an integer.
  
  The answer for the second test case is "10 10". The sum of the nominal values is 10 ⋅ 1 + 10 ⋅ 2 = 30 and |10 - 10| = 0, whereas there's no number having an absolute value less than 0.
solution: #!/usr/bin/env python
  from __future__ import division, print_function
  import os
  import sys
  from io import BytesIO, IOBase
  
  if sys.version_info[0] < 3:
      from __builtin__ import xrange as range
      from future_builtins import ascii, filter, hex, map, oct, zip
  BUFSIZE = 8192
  class FastIO(IOBase):
      newlines = 0
  
      def __init__(self, file):
          self._fd = file.fileno()
          self.buffer = BytesIO()
          self.writable = "x" in file.mode or "r" not in file.mode
          self.write = self.buffer.write if self.writable else None
  
      def read(self):
          while True:
              b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
              if not b:
                  break
              ptr = self.buffer.tell()
              self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
          self.newlines = 0
          return self.buffer.read()
  
      def readline(self):
          while self.newlines == 0:
              b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
              self.newlines = b.count(b"\n") + (not b)
              ptr = self.buffer.tell()
              self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
          self.newlines -= 1
          return self.buffer.readline()
  
      def flush(self):
          if self.writable:
              os.write(self._fd, self.buffer.getvalue())
              self.buffer.truncate(0), self.buffer.seek(0)
  
  
  class IOWrapper(IOBase):
      def __init__(self, file):
          self.buffer = FastIO(file)
          self.flush = self.buffer.flush
          self.writable = self.buffer.writable
          self.write = lambda s: self.buffer.write(s.encode("ascii"))
          self.read = lambda: self.buffer.read().decode("ascii")
          self.readline = lambda: self.buffer.readline().decode("ascii")
  
  
  def print(*args, **kwargs):
      """Prints the values to a stream, or to sys.stdout by default."""
      sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
      at_start = True
      for x in args:
          if not at_start:
              file.write(sep)
          file.write(str(x))
          at_start = False
      file.write(kwargs.pop("end", "\n"))
      if kwargs.pop("flush", False):
          file.flush()
  
  
  if sys.version_info[0] < 3:
      sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
  else:
      sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
  
  input = lambda: sys.stdin.readline().rstrip("\r\n")
  
  def inp(): return input()
  def sep(): return map(int,input().split())
  def inpu(): return int(input())
  def lis(): return list(map(int,input().split()))
  M=10**9+7
  """
  def main():
      t=1
      t=inpu()
      for _ in range(t):
          n=inpu()
          if n==9:
              print(1)
              continue
          else:
              if n%10==9:
                  print(n//10 +1)
              else:
                  print(n//10)
  if __name__ == '__main__':
      main()
  """
  
  def main():
      t=1
      t=inpu()
      for _ in range(t):
          n=inpu()
          if n%3==0:
              print(n//3,n//3)
          else:
              c=n%3
              if c==1:
                  print(n//3+1,n//3)
              else:
                  print(n//3,n//3+1)
  if __name__ == '__main__':
      main()
  