Let \( \vec{a} = 2\hat{i} + 3\hat{j} + 4\hat{k} \), \( \vec{b} = \hat{i} - 2\hat{j} - 2\hat{k} \) and \( \vec{c} = -\hat{i} + 4\hat{j} + 3\hat{k} \). If \( \vec{d} \) is a vector perpendicular to both \( \vec{b} \) and \( \vec{c} \), and \( \vec{a} \cdot \vec{d} = 18 \), then \( \left|\vec{a} \times \vec{d}\right|^{2} \) is equal to: