New algorithms for identifying the flavour of B-0 mesons using pions and protons