sentence1: The school teaches pupils from Inverkeithing , Dalgety Bay , Rosyth , North Queensferry , Aberdour and High Valleyfield , but also from Dunfermline under exceptional circumstances .
sentence2: The school teaches students from Inverkeithing , Dalgety Bay , Rosyth , North Queensferry , Aberdour and High Valleyfield , but also under extraordinary circumstances from Dunfermline .