First of all,
Now on to your homework:
(Notice that chatGPT corrected the compound statement spelling, but incorrectly turned it into an if and only if!)
Once again, there's confusion about "only if", which chatGPT turns into an "if and only if" (far too strong).
In addition, chatGPT screws up the "is a necessary condition", writing the converse.