# -*- coding: utf-8 -*-
from fn import _
n = [0, 3, 5, 6]
a = n + map(15 - _, n[::-1])
b = list(set(range(16)) - set(a))
print a, b
for p in [0, 1, 2, 3]:
ai = sum(map(_**p, a))
bi = sum(map(_**p, b))
print ("{0:>5}"*2).format(ai,bi)
IyAtKi0gY29kaW5nOiB1dGYtOCAtKi0KCmZyb20gZm4gaW1wb3J0IF8KbiA9IFswLCAzLCA1LCA2XQphID0gbiArIG1hcCgxNSAtIF8sIG5bOjotMV0pCmIgPSBsaXN0KHNldChyYW5nZSgxNikpIC0gc2V0KGEpKQpwcmludCBhLCBiCmZvciBwIGluIFswLCAxLCAyLCAzXToKICAgIGFpID0gc3VtKG1hcChfKipwLCBhKSkKICAgIGJpID0gc3VtKG1hcChfKipwLCBiKSkKICAgIHByaW50ICgiezA6PjV9IioyKS5mb3JtYXQoYWksYmkp