def div(self, a, b):
    assert (not ((b.val % self.p) == 0))
    return FieldElem(((a.val * self.invert(b).val) % self.p), self)
def div(self, a, b):
    assert (not ((b.val % self.p) == 0))
    return FieldElem(((a.val * self.invert(b).val) % self.p), self)