Dunfermline, north-east of Edinburgh, west from Kirkcaldy