How to solve a modular inequality with optimization?

117 Views Asked by At

I have this:

$x\le y$

$ y\lt m$

$x^2\mod m < y$

$y$ and $m$ are given. I am trying to maximize the value of $x$.

Any advice on how to approach this?