Yes ... but in what capacity would you log them if you did?
You could log P u/t but not P1 as you can't fly solo ... but wait

You could agree prior to the flight to fly a portion of it in command which I think you could log P1, but then take off and and landing would have to be Pu/t ..... errr, I guess? Only one of you can log P1 and P2 is for the "big boys" with multi crew. I think a qualified pilot can log Pu/t with a non FI PPL, but a student can't.
Confusing innit?