Consolidating loans on investment property with primary residence mortgage

I have three mortgage loans : 2 on investment properties and one on primary residence. They are about 333k each. I can refinance primary residence with cash out to total of 1m loan and pay off investment property loans. My net cash out is 0. Reason: investment property rates are higher by at least 1 percent. Question: can I continue to deduct the interest reported on 1098 for primary residence on schedule E as usual? (Upto 333k each)