В IDEA все работает.
package com.javarush.task.task07.task0713;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Играем в Jолушку
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Integer> listBig = new ArrayList<Integer>();
while (true){
String s = reader.readLine();
if (s.isEmpty()) break;
listBig.add(Integer.parseInt(s));
}
ArrayList<Integer> listOne = new ArrayList<Integer>();
ArrayList<Integer> listTwo = new ArrayList<Integer>();
ArrayList<Integer> listThree = new ArrayList<Integer>();
for(int i = 0; i < listBig.size(); i++){
int x = listBig.get(i);
if(x % 3 == 0 && x % 2 == 0){
listOne.add(x);
listTwo.add(x);
}else if(x % 3 == 0 && x % 2 != 0){
listOne.add(x);
}else if(x % 2 == 0 && x % 3 != 0){
listTwo.add(x);
}else if(x % 3 != 0 && x % 2 != 0)
listThree.add(x);
}
printList(listOne);
printList(listTwo);
printList(listThree);
}
public static void printList(ArrayList<Integer> list) {
for(int i = 0; i < list.size(); i++){
System.out.println(list.get(i));
}
}
}