from collections import namedtuple
from math import pow, sqrt
Point = namedtuple('Point', ('x', 'y'))
a = Point(0, 0)
b = Point(8, 2)
c = Point(-2, 6)
len_ = lambda p1, p2: sqrt(pow(p2.x - p1.x, 2) + pow(p2.y - p1.y, 2))
ab = len_(a, b)
ac = len_(a, c)
bc = len_(b, c)
perimeter = sum((ab, ac, bc))
area = ((a.x - c.x) * (b.y - c.y) - (b.x - c.x) * (a.y - c.y)) / 2
print 'Perimeter: {}'.format(perimeter)
print 'Area: {}'.format(area)