Making A Skill Require Two States Before Allowing Use

So I have certain skills that require the caster to be afflicted with two specific states before they can be cast. I can get it to work with one state, but can't quite figure out how to apply it with a two-state restriction. For single-state restriction, I use this:

<Custom Requirement>

if (user.isStateAffected(x)) {

value = true;

} else {

value = false;

}

</Custom Requirement>

Is there some way to adjust this to achieve the two-state restriction? I'd appreciate the help, thank you ^^
if (user.isStateAffected(x) && user.isStateAffected(y)) {

value = true;

} else {

value = false;

}

</Custom Requirement>

Where x is the id of the first state and y is the id of second state.
if (user.isStateAffected(x) && user.isStateAffected(y)) {

value = true;

} else {

value = false;

}

</Custom Requirement>

Where x is the id of the first state and y is the id of second state.

Thank you so much. I appreciate that you all take time out of your day to answer these basic questions when we need the help!

Original thread: https://forums.rpgmakerweb.com/threads/making-a-skill-require-two-states-before-allowing-use.96027/