It depends on the individual children and their relationship, but in principle yes, it's a non issue.
Obviously if they fight or one or other is more than averagely reckless or naughty or if you've always wrapped them in cotton wool and never left them alone at all or let them have any independence or encouraged any self reliance it might not be a brilliant idea to go from being babies to left alone in one leap.
If you've left them for shorter periods before and they're averagely sensible it's fine. Emphasise that each child is responsible for themself but can ask the other for help and you're trusting them. The age gap is too small for a babysitting relationship.