# [Brachylog], 16 bytes ⟦₂{ṗṗᵐ}ˢ⟨⌋≡⌉⟩|∧0 [Try it online!][TIO-jb6b3ucu] [Brachylog]: https://github.com/JCumin/Brachylog [TIO-jb6b3ucu]: https://tio.run/##SypKTM6ozMlPN/r//9H8ZY@amqof7pwOQlsn1J5e9Gj@ikc93Y86Fz7q6Xw0f2XNo47lBv//RxtaGugYGRjE/o8CAA "Brachylog – Try It Online" The completely non-sensical "return 0 if there's no prime" makes us lose 3 bytes (`|∧0`) for no reason (it would return `false.` if we didnt add them) ###Explanation ⟦₂ Range from the smallest element of the input to the biggest { }ˢ Select on that range: ṗ Numbers that are primes ṗᵐ And whose digits are primes ⟨ ⟩ Fork on this new list: ⌋ Minimum ⌉ maximum ≡ Do nothing and return [Minimum, Maximum] |∧0 If all of this fails (i.e. the list after selection is empty), return 0