gmail – Filtering and labeling messages as "INTERNAL ONLY" and "EXTERNAL"

I want to create a pair of labels.

One would be "INTERN-ONLY". This label should match email threads that contain only senders and recipients in the thread whose e-mail domain @ example.com matches my domain.

The second would be "EXTERNAL". This label should match the disjunct sentence. These are email threads that contain someone in the sender or recipient list whose e-mail domain is not @ example.com.