• Source
    1. import java.util.*;
    2. class Ideone //extends Exception
    3. {
    4. public static void main(String args[])
    5. {
    6. Scanner s=new Scanner(System.in);
    7. int t=s.nextInt();
    8. while(t-->0)
    9. {
    10. int c=s.nextInt();
    11. int d=s.nextInt();
    12. int l=s.nextInt();
    13.  
    14. if(d>=c)
    15. {
    16. int min=d*4;
    17. int max=(c+d)*4;
    18. if(l>=min&&l<=max&&l%4==0)
    19. System.out.println("yes");
    20. else
    21. System.out.println("no");
    22.  
    23. }
    24. else if(c>d)
    25. {
    26. int min=((c-d*2)+d)*4;
    27. int max=(c+d)*4;
    28. if(l>=min&&l<=max&&l%4==0)
    29. System.out.println("yes");
    30. else
    31. System.out.println("no");
    32.  
    33. }
    34.  
    35.  
    36. }
    37.  
    38. }
    39. }