Ah the joy of javascript....
your combined payloads look like this
all good so far
Then your function does this
if (msg.payload.pi/35 == 1 && msg.payload.pi/37 == 1) {
which is a natural thing to do... but javascript doesn't like / in property names so it will be treating it like a divide :-)... so instead you need to do
if (msg.payload["pi/35"] == 1 && msg.payload["pi/37"] == 1) {