#include <bits/stdc++.h>
using namespace std;
long long int power(long long int a, long long int b, long long int m) {
  long long int ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans;
}
vector<pair<long long int, long long int> > v[300009], v1[300009];
long long int dist[300009];
bool vis[300009];
long long int parent[300009];
void initialise() {
  for (long long int i = 1; i < 300009; i++) {
    parent[i] = -1;
    v[i].clear();
    dist[i] = LLONG_MAX;
    vis[i] = 0;
  }
  return;
}
long long int dijkstra(long long int src, long long int dest) {
  vis[src] = 1;
  multiset<pair<long long int, long long int> > s;
  s.insert({0, src});
  dist[src] = 0;
  while (s.size()) {
    auto it = s.begin();
    long long int d = it->first;
    long long int num = it->second;
    s.erase(it);
    vis[num] = 1;
    for (long long int i = 0; i < v[num].size(); i++) {
      if (vis[v[num][i].first]) continue;
      if (dist[num] + v[num][i].second >= dist[v[num][i].first]) continue;
      dist[v[num][i].first] = dist[num] + v[num][i].second;
      parent[v[num][i].first] = num;
      s.insert({dist[num] + v[num][i].second, v[num][i].first});
    }
  }
  return dist[dest];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  initialise();
  for (long long int i = 0; i < m; i++) {
    long long int l, r;
    cin >> l >> r;
    v1[l].push_back({r, 1});
    v[r].push_back({l, 1});
  }
  long long int k;
  cin >> k;
  long long int path[k + 2];
  for (long long int i = 1; i < k + 1; i++) cin >> path[i];
  dijkstra(path[k], path[1]);
  long long int mini = 0, maxi = 0;
  for (long long int i = 1; i < k; i++) {
    long long int d_curr = dist[path[i]];
    long long int d_next = dist[path[i + 1]];
    if (d_next + 1 != d_curr) {
      mini++;
      maxi++;
    } else {
      for (auto it : v1[path[i]])
        if (it.first != path[i + 1] and dist[it.first] == (d_curr - 1)) {
          maxi++;
          break;
        }
    }
  }
  cout << mini << " " << maxi << endl;
}
