So, what is "i"? Did you mean ":"? I assume ":" here.
Start by looking at the first criterion, you can write
This will give you a logical vector. Do the same with the other criterions and combine them.
Hint: For the last criterion the function "all" is useful.