abc+ab+bc+ca+a+b+c+1
=(abc+ab)+(bc+b)+(ca+a)+(c+1)
=ab(c+1)+b(c+1)+a(c+1)+(c+1)
=(c+1)(ab+a+b+1)
=(c+1)[(ab+a)+(b+1)]
=(c+1)[a(b+1)+(b+1)]
=(c+1)(b+1)(a+1)
abc+ab+bc+ca+a+b+c+1
=(abc+ab)+(bc+b)+(ca+a)+(c+1)
=ab(c+1)+b(c+1)+a(c+1)+(c+1)
=(c+1)(ab+a+b+1)
=(c+1)[(ab+a)+(b+1)]
=(c+1)[a(b+1)+(b+1)]
=(c+1)(b+1)(a+1)