comefrom: <gouthampradhan>math_LargestComponentSizebyCommonFactor_1.java
code: private List<Integer> primes(int N, int[] A) {
      boolean[] P = new boolean[N + 1];
      int[] pF = new int[N + 1];
      int sqRt = (int) Math.sqrt(N);
      for (int i = 2; i <= sqRt; i++) {
        if (!P[i]) {
          for (int j = 2; ; j++) {
            if (i * j > N) break;
            P[i * j] = true;
            if (pF[i * j] == 0) {
              pF[i * j] = i;
            }
          }
        }
      }
      Map<Integer, Integer> result = new HashMap<>();
      for (int a : A) {
        if (a == 1) continue;
        int n = pF[a];
        while (n != 0) {
          result.putIfAbsent(n, 0);
          result.put(n, result.get(n) + 1);
          a /= n;
          n = pF[a];
        }
        result.putIfAbsent(a, 0);
        result.put(a, result.get(a) + 1);
      }
      return result.keySet().stream().filter(x -> result.get(x) > 1).collect(Collectors.toList());
    }
masked: private List < Integer > var_0 ( int var_1 , int [ ] var_2 ) {
    boolean [ ] var_3 = new boolean [ var_1 + 1 ] ;
    int [ ] var_4 = new int [ var_1 + 1 ] ;
    int var_5 = ( int ) Math . sqrt ( var_1 ) ;
    for ( int var_6 = 2 ;
    var_6 <= var_5 ;
    var_6 ++ ) {
      if ( ! var_3 [ var_6 ] ) {
        for ( int var_7 = 2 ;
        ;
        var_7 ++ ) {
          if ( var_6 * var_7 > var_1 ) break ;
          var_3 [ var_6 * var_7 ] = true ;
          if ( var_4 [ var_6 * var_7 ] == 0 ) {
            var_4 [ var_6 * var_7 ] = var_6 ;
          }
        }
      }
    }
    Map < Integer , Integer > var_8 = new HashMap < > ( ) ;
    for ( int var_9 : var_2 ) {
      if ( var_9 == 1 ) continue ;
      int var_10 = var_4 [ var_9 ] ;
      while ( var_10 != 0 ) {
        var_8 . putIfAbsent ( var_10 , 0 ) ;
        var_8 . put ( var_10 , var_8 . get ( var_10 ) + 1 ) ;
        var_9 /= var_10 ;
        var_10 = var_4 [ var_9 ] ;
      }
      var_8 . putIfAbsent ( var_9 , 0 ) ;
      var_8 . put ( var_9 , var_8 . get ( var_9 ) + 1 ) ;
    }
    return var_8 . keySet ( ) . stream ( ) . filter ( var_11 -> var_8 . get ( var_11 ) > 1 ) . collect ( Collectors . toList ( ) ) ;
  }
  