Let p(x)=x²+bx+c, where b and c are integers. If p(x) is a factor of both x⁴+6x²+25 and 3x⁴+4x²+28x+5, find the value of p(1).