Iranian President Mahmoud Ahmadinejad has criticized Paul the octopus , who gained fame by correctly predicting the outcome of eight World Cup matches .