# [Java (JDK)], 74 bytes <!-- language-all: lang-java --> n->{int m=n/100%100;return(m==2?n%4<1?2:1:~m%9%2)<31-(n/=1e4)&13>m&n*m>0;} [Try it online!][TIO-k8jzxfkh] [Java (JDK)]: http://jdk.java.net/ [TIO-k8jzxfkh]: https://tio.run/##LZLBbqMwEIbvfQqrEhVUhHpsDDgp6XkPK63UY9UDm0BFNpgITKVVlH317AA/kv3pG@EZe@xT9V1tTsc/97a79IMXJ/Zk8u05aSZ38G3vkufdZfp9bg/icK7GUfysWndFZPSVZ3z37VF0HA/f/dC6r4/Pavgao@sP538N9bE9VL4WTXl3m/21dV50pXshKQMeu6H20@DCrizVmwvSV3pTW9r@6wIbqOhV0yZ0LyXVafREet89ueduL3e3@@5B8MfJPj59PfqxvBqiOOOhrFRSrkhjsbCIheZisy80CwlOcAVXcA3XcAM38Byewwt4sTqhHqEeIT8hPyE/IT@l8HR2QTKz7BxQBe9fGEnWLlR2dW1zZiZTmzF5F5bXcbXcaqaRhVXMgqjgddwTa4lpSFrJLJY2rSRQgRpMQQNmYA4W6C@BCtSgATMwX/qDc8oUfcvgGdzCLfqCe2IacVsvvukHEc5Pab787TKP0fvf0ddd0k8@ufAz9E34GMjsuBXBGLjHeP4pbpIZ4TxF0Zzr9nC7/wc "Java (JDK) – Try It Online" ## Credits * -1 byte thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat) * -3 bytes thanks to [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen)