Pakistani premier says US 'messed it up in Afghanistan'