A polynomial sieve: beyond separation of variables