#include #define rep(i,n) for(int i = 0;i> n; int na[3] = {0,0,0}; rep(i, 3) rep(_, n){ int a; cin >> a; if(a%3!=0) na[i]++; } cout << na[0]*na[1]*na[2] << endl; return 0; }