A Cayley–Bacharach theorem for points in Pn