# [Wolfram Language (Mathematica)], <s>33</s> 26 bytes I just noticed that for no integer solution, the output is undefined instead of empty list; that allows to remove a few bytes. x/.Solve[#==0,x,Integers]& [Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b7v0JfLzg/pyw1WtnW1kCnQsczryQ1PbWoOFbtP1dAUWZeiYNWmoK@g0J1RZyRtmmFtpmOgqEBkK1rYlShbaGjAGIaVYBoU@2KOBNdY8uKOGNdQyNDkARQpbahGViVia6hMcgIY6ABFbqmYI3aQCOMa/8DAA "Wolfram Language (Mathematica) – Try It Online") Now if no integer solution exists, the function returns `x`. **Previously:** x/.Solve[#==0,x,Integers]/.x->{}& [Try it online!][TIO-jcub8jdl] [Wolfram Language (Mathematica)]: https://www.wolfram.com/wolframscript/ [TIO-jcub8jdl]: https://tio.run/##HYzLCsIwFET3fkVAcGFym@ZVdBHp1p3gUgwESbVgK9QgF0q/PSZdzcCcOYOPrzD42D986mxCXl0/71@4ba2tGbLzGMMzTN87rxBO87JLm8vUj7Hdd4S3ZEYnqUHaMCLq3EFLpAdGSpVY0lB0GtQRnQIhRRkySUWzUhqEKgqVBQhmPdKsUEv6Aw "Wolfram Language (Mathematica) – Try It Online"