PSX ends flat amid thin trading