SUBARU IMPREZA RPM PROBLEM

1998 Subaru Impreza • 190 miles

My car is giving me both a P0103 (hi MAF input) and P0102 (low MAF input) code. The car starts fine and idles around 1000 RPMS for about 2-3 minutes. Then the idle slowly starts to fade until the car stalls out.

We cleaned the MAF sensor just now and problem persists, with same codes. Any idea why it would be giving me both a Hi and Low input MAF code?

Also, is replacing the MAF the way to go or is there potentially something else wrong?