// Danny Wasserman
// 7/23/2014
// Solution to 2014 SI@UCF Contest Problem: Easy Change

import java.util.Scanner;
public class change {

  public static void main(String[] args) {

    Scanner in = new Scanner(System.in);
    int cases = in.nextInt();

    // Go through each case.
    while (cases-- != 0) {

      // We never need to use more than one quarter...
      int v = in.nextInt();
      int v2 = v - 25;

      // Try no quarter and one square and solve...
      if ((v % 10) == 0 || (v >= 25 && ((v - 25) % 10) == 0)) System.out.println("yes");
      else System.out.println("no");
    }
  }
}
