#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ull unsigned long long int
#define pb push_back
#define pf push_front
#define en cout<<endl;
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define no1 {cout<<-1<<endl; r0}
#define no0 {cout<<0<<endl; r0}
#define yes_r { cout<<"YES"<<endl; return ; }
#define no_r { cout<<"NO"<<endl; return ; }
#define r0 return ;
#define fr first
#define sc second
#define srt(name) sort(name.begin(), name.end());
#define rev(name) reverse(name.begin(), name.end());
#define TT { ios_base::sync_with_stdio(0) ; cin.tie(0) ; cout.tie(0) ; int tt; cin>>tt; while (tt--) not_main(); }
#define TT1 { not_main(); }
#define TTi { while(1) no
#define IMP { cout<<"IMPOSSIBLE"<<endl; r0 }
const int INF=1e9+1;
const int mod=998244353;
const int N=1e5+1;
void not_main()
{
ios_base::sync_with_stdio(0) ; cin.tie(0) ; cout.tie(0);
ll n; cin>>n;
ll v[n];
for (ll i=0; i<n; i++) cin>>v[i];
ll sum=0;
ll pos=-1;
for (ll i=0; i<n; i++){
sum+=v[i];
if (v[i]%2==1) pos=i+1;
}
//cout<<sum<<endl;
bool sostav=false;
ll cr=0;
for (ll i=1; i<=sum; i++){
if (sum%i==0) cr++;
if (cr==3){
sostav=true;
break;
}
}
//cout<<cr<<endl;
if (sostav==true){
cout<<n<<endl;
for (ll i=1; i<=n; i++) cout<<i<<' ';
en
}
else
{
cout<<n-1<<endl;
for (ll i=1; i<=n; i++){
if (i!=pos) cout<<i<<' ';
}
en
}
}
int main(){
TT
}
///CHECK TT CLASS
/* comment box */
/**
**/
/** MAY BE USEFUL: **/
/*
#include<windows.h>
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
string all = "abcdefghijklmnopqrstuvwxyz";
string Call= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string Vow = "aeiou"
*/
1302. Deepest Leaves Sum | 1209. Remove All Adjacent Duplicates in String II |
994. Rotting Oranges | 983. Minimum Cost For Tickets |
973. K Closest Points to Origin | 969. Pancake Sorting |
967. Numbers With Same Consecutive Differences | 957. Prison Cells After N Days |
946. Validate Stack Sequences | 921. Minimum Add to Make Parentheses Valid |
881. Boats to Save People | 497. Random Point in Non-overlapping Rectangles |
528. Random Pick with Weight | 470. Implement Rand10() Using Rand7() |
866. Prime Palindrome | 1516A - Tit for Tat |
622. Design Circular Queue | 814. Binary Tree Pruning |
791. Custom Sort String | 787. Cheapest Flights Within K Stops |
779. K-th Symbol in Grammar | 701. Insert into a Binary Search Tree |
429. N-ary Tree Level Order Traversal | 739. Daily Temperatures |
647. Palindromic Substrings | 583. Delete Operation for Two Strings |
518. Coin Change 2 | 516. Longest Palindromic Subsequence |
468. Validate IP Address | 450. Delete Node in a BST |