Yes, you can. Output pins are the ones to create trouble when connected together.