If f(x) = ⎧⎪⎨⎪⎩mx2+n,x<0nx+m,0≤x≤1nx3+m,x>1 for what intergers m and n does both limx→0 f(x) and limx→1 f(x) exist?