#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
int XX[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int YY[] = {-1, 0, 1, -1, 1, -1, 0, 1};
vector<long long int> vec1[200005], vec2[200005];
long long int arr[200005];
long long int n, m, k;
long long int dis[200005];
void shordis() {
  for (int i = 0; i <= 200003; i++) dis[i] = INT_MAX;
  dis[arr[k - 1]] = 0;
  queue<pair<long long int, long long int> > pq;
  pq.push(make_pair(0, arr[k - 1]));
  while (!pq.empty()) {
    auto itr = pq.front();
    pq.pop();
    long long int cost = itr.first;
    long long int node = itr.second;
    for (auto itr : vec2[node]) {
      if (cost + 1 < dis[itr]) {
        dis[itr] = cost + 1;
        pq.push(make_pair(dis[itr], itr));
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int i, j, l, r, u, v;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> u >> v;
    vec1[u].push_back(v);
    vec2[v].push_back(u);
  }
  cin >> k;
  for (i = 0; i < k; i++) cin >> arr[i];
  shordis();
  long long int ans1 = 0, ans2 = 0;
  for (i = 0; i < k - 1; i++) {
    long long int ind1 = arr[i];
    long long int ind2 = arr[i + 1];
    vector<long long int> vec;
    long long int mini = 9000000000000000000;
    for (auto itr : vec1[ind1]) {
      if (dis[itr] < mini) {
        vec.clear();
        mini = dis[itr];
        vec.push_back(itr);
      } else if (dis[itr] == mini)
        vec.push_back(itr);
    }
    if (vec.size() == 1) {
      if (vec[0] != ind2) {
        ans1++;
        ans2++;
      }
    } else if (vec.size() > 1) {
      long long int flag = 0;
      for (j = 0; j < vec.size(); j++) {
        if (vec[j] == ind2) {
          flag = 1;
          break;
        }
      }
      if (flag == 0) {
        ans1++;
        ans2++;
      } else
        ans2++;
    }
  }
  cout << ans1 << " " << ans2;
}
