Comparison of magnetoresistances of triangular and rectangular ballistic graphene npn junctions