5^z7^w\equiv 7\pmod 8