The one in the y-pipe is the downstream (aka sensor 2) one. For those codes (P0133 and P0171), you need to replace the one in the exhaust manifold on that side, closest to the engine.