How can I turn off two videos via an external button html 5

How can I turn off two videos via an external button html 5


I tried to place this code, but the buttons only play one video

<!DOCTYPE html> 
<html> 
<body> 

<button onclick="playVid()" type="button">Play Video</button>
<button onclick="pauseVid()" type="button">Pause Video</button><br> 

<video id="09876" width="320" height="176">
  <source src="mov_bbb.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

<script> 
var vid = document.getElementById("09876"); 

function playVid() { 
    vid.play(); 

function pauseVid() { 
    vid.pause(); 
</script> <br> 


<button onclick="playVid()" type="button">Play Video</button>
<button onclick="pauseVid()" type="button">Pause Video</button><br> 

<video id="6689" width="320" height="176">
  <source src="mov_bbb.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

<script> 
var vid = document.getElementById("6689"); 

function playVid() { 
    vid.play(); 

function pauseVid() { 
    vid.pause(); 
</script> 

Tell me what the solution is