Team 1 wins.
Madara+Nagato+Obito+Itachi+Sasuke+DSM Kabuto+Orochimaru (knows ALOT of forbidden ninjutsu) stomp, add the rest of team 1 and they will obliterate everything.
Team 2 cant win, its technically impossible because of one single reason:
Izanagi!
Madara, Obito, Itachi and Sasuke can all use Izanagi ones (10 minutes each) with their full powers and even use it a second time with the remaining eye (sure alot weaker because they wont be able to use some techniques but still).
The 4 strongest Uchiha´s with 20 minutes of immortality > NV.