Obama wins Afghan, Pakistan vows to fight al Qaeda